Powerstat
Purpose:: Measure power consumption using battery power level or RAPL
Type:: #tool/cmd
Website:: https://github.com/ColinIanKing/powerstat
Man page:: https://manpages.ubuntu.com/manpages/xenial/man8/powerstat.8.html
Source Code:: https://github.com/ColinIanKing/powerstat
Description
powerstat measures the power consumption of a computer that has a battery power source or supports the RAPL (Running Average Power Limit) interface. The output is like vmstat but also shows power consumption statistics. At the end of a run, powerstat will calculate the average, standard deviation and min/max of the gathered data.
Installation
sudo apt install powerstat
Commands
Measure power with the default of 10 samples with an interval of 10 seconds
powerstat
Measure power with 60 samples with an interval of 1 second:
powerstat 1 60
Measure power using the Intel RAPL interface:
powerstat -R