For laptops and mobile PCs running on battery source, powerstat is a useful Linux Mint software that shows the detailed power battery consumption along with the average, standard deviation and maximum/minimum values of collected data.
To install it, open Terminal in Linux Mint (this is applicable to Ubuntu as well) and type :
Once installed, it can be run with various parameters. The most common parameter that shows detailed consumption is the -a flag (all).
To start collecting power consumption details of laptop battery, use the following command :
Wait for the readings to complete or exit using Ctrl-C. Powerstat will compute various statistics from the collected samples like average, standard deviation and min/max values. Also, a histogram will be displayed (the -a flag includes this).
Powerstat utility by default starts after a delay of 180 seconds when laptop is running on battery. This is for the battery source to stabilize before readings can be collected. However, this can be modified using the -d flag.
Now, suppose power consumption needs to be measured with an interval of 1 second and 20 such samples need to be collected. The command for this would be :
The default option is powerstat taking 10 readings with an interval of 10 seconds. To use this, simply type :
Various other parameters can be used as needed. Use the powerstat help page for viewing different custom options :
This is a simple and useful tool for Linux Mint that can be run when wanting to test or evaluate laptop battery usage.
(For other such Linux Mint tips, check out the previous articles here).
Wow. That is so elegant and logical and clearly explained. Keep it up! I follow up your blog for future post.