Find the power supply hardware information for a PC using Ubuntu's command-line

You can't. The plug between the power supply and the mainboard follows the ATX specification, which regulates which signals and which voltages shall be present.

ATX Signals

Com is common, or ground. The rest of the pins are used for voltages, or simple binary signals, like PS_ON and PWR_OK. There is no bus data transfer pins. The operating system simply has no way of knowing anything about the power supply.

Some server systems come with sensors in the power supply. Such sensors should show up in lmsensors. For instance it's quite common that they will report power consumption, fan speed and temperature. But in this case, you should specify which system you have - as this is typically not seen in normal PC's.

Other power supplies may include a monitoring interface over USB. What data they will provide will differ from power supply to power supply. To check if the PSU in question provides this, run lsusb and look for something that resembles a power supply. This may include model, or simply be generic for an entire class of different power supplies.


To find the power supply information, use following command:

sudo dmidecode --type 39

The below command outputs a lot status and statistical information about the battery. The /org/... path can be found with the command upower -e (--enumerate).

upower -i /org/freedesktop/UPower/devices/battery_BAT0

The one I use mostly is this one :

sudo apt-get install lm-sensors
sudo sensors-detect 

Choose YES to all.

sudo service kmod start

Use :

sensors

or

watch sensors