Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Programatically getting USB power draw of a device?

Tags:

linux

windows

usb

In Windows, it is possible to view a Power tab for a USB hub in Device Manager that lists information such as whether the hub is self-powered and the total power available.

Is this information available programatically, either in Windows (perhaps WMI?) or Linux? I've looked in MSDN with little success so far.

like image 668
Soo Wei Tan Avatar asked Oct 27 '25 21:10

Soo Wei Tan


2 Answers

Linux:

lsusb -v | grep MaxPower

like image 190
Anonymouse Avatar answered Oct 29 '25 18:10

Anonymouse


I think WMI is going to be your best bet here. I'm not familar with exactly what you want, but I'd start with the Win32_VoltageProbe class.

like image 32
popester Avatar answered Oct 29 '25 17:10

popester



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!