4

Do you know any apps that monitor system power consumption? Not just cpu, but all components, preferably?


UPDATE - powertop & powerstat

I found powertop, but it doesn't say much.

enter image description here

I've also found this question: Power consumption monitoring problem and its duplicate on Ask Ubuntu: https://askubuntu.com/questions/291904/missed-power-est-column-in-powertop.

The answer is powertop needs a few hours to collect data before it provides calculations of power consumption. (Also grochmal advises this in his comments.) But this may not be the whole truth, in the light of what I found running powertop in the background.

$ sudo powertop &
[1] 20744
tomasz@tomasz-Latitude-E4200:~$ Loaded 0 prior measurements
Cannot load from file /var/cache/powertop/saved_parameters.powertop
File will be loaded after taking minimum number of measurement(s) with battery only 
RAPL device for cpu 0
RAPL device for cpu 0
RAPL device for cpu 0
Devfreq not enabled
Cannot load from file /var/cache/powertop/saved_parameters.powertop
File will be loaded after taking minimum number of measurement(s) with battery only 

The Ask Ubuntu answer also mentions:

powerstat

It demands the laptop to run on battery (so not for RaspberryPi and desktops) and after 3 minutes gives this:

  Time    User  Nice   Sys  Idle    IO  Run Ctxt/s  IRQ/s Fork Exec Exit  Watts
03:28:26  20.2   0.0   2.4  77.4   0.1    1   1356    675    2    0    0  17.28 
03:28:36  12.8   0.0   2.4  84.8   0.1    1   1749    699    0    0    1  11.82 
03:28:46  11.6   0.0   1.7  86.7   0.0    1   1190    553    0    0    0  11.56 
03:28:56  16.8   0.0   2.4  80.7   0.1    1   1455    680    4    0    4  13.48 
03:29:06  14.7   0.0   1.9  83.4   0.1    2   1486    696    0    0    0  16.11 
03:29:16  22.6   0.0   3.1  74.3   0.0    3   2494    987    0    0    0  13.68 
03:29:26   4.3   0.0   0.8  94.9   0.1    2    806    391    0    0    1  12.05 
03:29:36   5.4   0.0   1.6  93.0   0.1    1   1219    665    4    0    2  11.85

Which is better. But a breakdown on components is missing. Or I don't know how to get them.

4

The only way to get an accurate reading of the whole computer's power consumption is to use an external power meter such as this one, for example.

Anything built-in will be flawed and ignore certain aspects like the energy loss inside the power supply and its fan, and possibly wrongly evaluate certain component consumption.

  • 1
    Another option is to open the case and use a voltmeter, and cross fingers not to make a short circuit :). Just kidding. But yes, you're right, any software based measure will not be a good measure. At best, a software based measure has statistical value against other software measures (which turns to be good enough for some uses). – grochmal Aug 19 '16 at 1:08
  • So ideally I'd have an outside meter plus an inside meter, right? – Tomasz Aug 19 '16 at 1:19
  • Apparently there's a middle way. Measurement while on battery. See the question update. This applies to powertop too, btw. – Tomasz Aug 19 '16 at 2:10
1

Intel's powertop shows exactly that, power consumption by device. It even has a tunnables tab where it attempts to change parameters of these devices to use less energy.

Although written by Intel (surprisingly as open-source), it has been ported to ARM based machines.

References

  • I've already checked it. And found this question unix.stackexchange.com/questions/74942/… And have the same objection. No power consumption numbers (I have v. 2.8.). – Tomasz Aug 19 '16 at 0:52
  • @tomas - Hmmm... do you have pciutils installed? That is what reads the configuration registers on the PCI devices. Also, powertop needs some time (a couple of minutes sometimes) to actually get consumption estimates. – grochmal Aug 19 '16 at 0:55
  • Yes. Should I let powertop know about this explicitly? Does it care? – Tomasz Aug 19 '16 at 1:00
  • @tomas - for now just leave it running for some time (and cross fingers). I have v2.8 and it works more-or-less well, but I do use it from time to time so it got some data to make the stats on. – grochmal Aug 19 '16 at 1:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.