The Cookie Machine - Click here to drag window

DUMMY TEXT - Real text set in assets/js/theCookieMachine.js

If you can read me, I'm broken!

Views: 106,132β€…    Votes:  7β€…
Tags: command-line   power-management   hardware  
Link: πŸ” See Original Answer on Ask Ubuntu ⧉ πŸ”—

URL: https://askubuntu.com/q/1009641
Title: Find the power supply hardware information for a PC using Ubuntu's command-line
ID: /2018/02/25/Find-the-power-supply-hardware-information-for-a-PC-using-Ubuntu_s-command-line
Created: February 25, 2018    Edited:  February 26, 2018
Upload: March 26, 2024    Layout:  post
TOC: false    Navigation:  false    Copy to clipboard:  false


Software interface to Power Supply

As mentioned in the top voted answer a special communication channel to the Power Supply is required. On my laptop there is a USB 3 self powered hub connected to the UPS (Interruptible Power Supply). Although you don’t have this type of power supply the communication concept would be similar:

$ sudo pwrstat -status

The UPS information shows as following:

	Properties:
		Model Name................... CP550HGa
		Firmware Number.............. BFBB104#BI1.g
		Rating Voltage............... 120 V
		Rating Power................. 330 Watt

	Current UPS status:
		State........................ Normal
		Power Supply by.............. Utility Power
		Utility Voltage.............. 121 V
		Output Voltage............... 121 V
		Battery Capacity............. 100 %
		Remaining Runtime............ 33 min.
		Load......................... 72 Watt(22 %)
		Test Result.................. Unknown
		Last Power Event............. None

The current load is 72 Watts and the maximum load is 330 watts.

Installing pwrstat

To install pwrstat go to the Cyber Power Systems website Linux Software page. You will find 32-bit and 64-bit downloads available for all Linux distro’s but make sure you select the one for Debian (.deb) which Ubuntu is based on.

After downloading install it using:

sudo dpkg -i powerpanel_132_amd64.deb

To learn more about using pwrstat use:

man pwrstat   # to learn more about the terminal interface
man pwrstatd  # to learn about background daemon with alarms, auto shutdown, etc.

What to do when there is no software

The old tried and true method is to look at the safety label on your power supply. By law in most countries this label must exist. For my old laptop it is as easy as looking at the power brick. For your desktop PC it may be on the back or you might have to open it up and look inside:

Dell Inspiron Power Supply

The label shows:

What to do when you can’t look at the hardware

You could get someone who is on site to take the picture for you. If that isn’t viable get the make and model of the computer and google the power supply specs. From this article the generic specs for PCs are:

Note the amperage is specified for 12 Volt rail output. So 15A = 180 watts and 50A (For dual video cards) = 600 watts. Wattage = Amperage * Voltage.

⇧ What is the difference between graphics drivers in the kernel, and graphics drivers for Xorg? How to make gnome-screenshot select area to grab after a specified delay  β‡©