67

The powertop program shows the power usage, but only after about five minutes. Before that, it shows:

no ACPI power usage estimate available

That's one of the limitations of the powertop program. What program is recommended for reliably monitoring the power usage? Is it possible to get a power usage history similar to the memory usage history in the System Monitor as well?

5
  • I was just testing with powertop on my laptop and did not noticed any issue like this. What version are you using?
    – Cas
    Mar 30, 2012 at 1:53
  • I had that issue with 1.13 (the one in Maverick), 1.97 from Oneiric does not show power usage at all.
    – Lekensteyn
    Mar 30, 2012 at 9:33
  • Are you using this on a latop with the power cable unplugged? Here are screenshots of both powertop versions with power usage showing: imgur.com/TA0BS,GresK#0
    – Cas
    Mar 30, 2012 at 14:45
  • I've waited for five minutes after unplugging before testing (before that, it uses the line). Checking the source, it seems that powertop 1.97 relies on the "present rate" field for reporting charge rate. My battery always reports "unknown" for it, and I have to use the "remaining capacity" field from /proc/acpi/battery/BAT0/state.
    – Lekensteyn
    Mar 30, 2012 at 15:17
  • 2

5 Answers 5

60

As you surmised in your comment the limitation is not with the software but with your battery not reporting correctly.

To clarify these software tools below will only measure power consumption on laptops when running on battery. For desktop or server machines the only current solution is an electronic watt-meter that plugs into the mains socket.

#Power Statistics

In Ubuntu Precise 12.04 there is a new power statistics history window. This can be accessed by clicking the battery item in the application indicator menu then selecting Latop Battery tab.

#Powertop

As mentioned by the OP this program provides information on per process/device power usage.

#Powerstat

Another alternative that measures process/device power usage is powerstat that was written for Ubuntu by Colin King. There is a detailed review of its features on hecticgeek.com.

It can be installed from the PPA: ppa:colin-king/powermanagement

enter image description here

8
  • +1 nice pics, do you happen to know if Kubuntu 12.04 has a similar program?
    – Lekensteyn
    Apr 2, 2012 at 20:21
  • 16
    What about power consumption for battery-less computers ? Powerstat doesn't support them (Error message : Machine is not discharging and hence we cannot measure power usage.) Nov 27, 2013 at 23:30
  • 1
    Is it only me, or where does powertop actually show power consumption, in the screenshot above, or elsewhere?
    – matanox
    Jun 27, 2017 at 8:29
  • 2
    My name is Colin King coincidentally... When I first saw this answer, I was like, "No way... That's creepy... Who the heck is this Colin King guy because I sure didn't provide this application."
    – user689883
    Jun 18, 2018 at 22:07
  • 2
    powerstat is available through apt and snap now. no need for ppa.
    – qwr
    Mar 19, 2020 at 20:55
7

Have a look at s-tui: https://amanusk.github.io/s-tui/. Runs in the terminal, shows you the parameters pertinent to the CPU.

1
  • It does not show watt consuption Dec 5, 2023 at 13:33
6

You can have a look at PowerAPI (on github), which gives the power consumption at the process level on Linux. According to some experiments, it is more accurate than Powertop.

1

I found that only TLP was able to report power consumption in near-realtime (<3 s delay), while at least for my system Gnome Power Statistics (gnome-power-statistics) and upower had a delay of 120 seconds before the values updated again.

To see current power as reported by TLP, use this command:

sudo tlp-stat --battery

Environment: ThinkPad X201 Tablet with Ubuntu 20.04. TLP together with the SMAPI kernel module (that TLP recommends) installed with sudo apt install tlp tp-smapi-dkms, then TLP enabled with sudo tlp start. It may be that the SMAPI kernel module enables the more frequent updates, as it provides a different way to access and configure the battery.

1

Intel has a cross-platform (MacOS, and Windows) app called 'Intel Power Gadget' which provides for logging of power consumption information, including cumulative power measurements, via a command line version and a GUI version.

Intel have a version of Power Gadget for Linux but it hasn't been updated for a while. There's also an external version that has been modified/updated more recently.

1
  • I've updated my answer - with info on Linux version(s).
    – Pierz
    Jun 16, 2022 at 14:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .