Get power consumption of a USB device
Take a look at this SuperUser Q&A titled: How do you check how much power a USB port can deliver?, specifically my answer.
lsusb -v
You can get the maximum power using lsusb -v
, for example:
$ lsusb -v|egrep "^Bus|MaxPower"
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
MaxPower 0mA
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
MaxPower 0mA
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
MaxPower 0mA
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
MaxPower 0mA
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
MaxPower 0mA
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
MaxPower 0mA
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
MaxPower 0mA
Bus 001 Device 003: ID 05e3:0608 Genesys Logic, Inc. USB-2.0 4-Port HUB
MaxPower 100mA
Bus 003 Device 002: ID 046d:c517 Logitech, Inc. LX710 Cordless Desktop Laser
MaxPower 98mA
Bus 001 Device 004: ID 04a9:1069 Canon, Inc. S820
MaxPower 2mA
Bus 001 Device 005: ID 05ac:120a Apple, Inc. iPod Nano
MaxPower 500mA
MaxPower 500mA
You could also have a look at usb-devices
:
$ usb-devices | grep 'Product=\|MxPwr'
S: Product=EHCI Host Controller
C: #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=0mA
C: #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=0mA
S: Product=EHCI Host Controller
C: #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=0mA
C: #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=0mA
S: Product=USB Keykoard
C: #Ifs= 2 Cfg#= 1 Atr=a0 MxPwr=98mA
S: Product=USB Receiver
C: #Ifs= 2 Cfg#= 1 Atr=a0 MxPwr=98mA
S: Product=DW375 Bluetooth Module
C: #Ifs= 4 Cfg#= 1 Atr=e0 MxPwr=100mA
S: Product=5880
C: #Ifs= 2 Cfg#= 0 Atr=c0 MxPwr=100mA
There's a bMaxPower
file in the device's sysfs folder. But I do not think it is going to be very useful. You'll be able to find that the device "requested" 500mA just to comply with the standard but not the actual current drain.