DEV Community

Thamaraiselvam
Thamaraiselvam

Posted on

How to check Which Application is Draining Your Battery on Linux

Powertop is a tool to diagnose issues with power consumption and power management to help set power saving settings.

Installation

Arch Linux:

sudo pacman -S powertop
Enter fullscreen mode Exit fullscreen mode

Debian based (Ubuntu, Mint, Raspbian ..etc):

add-apt-repository ppa:eugenesan/ppa
apt-get update
apt-get install powertop -y
Enter fullscreen mode Exit fullscreen mode

PowerTOP has been installed, you can use the following command to know more about it.

powertop --help
Enter fullscreen mode Exit fullscreen mode

Profile battery usages

Following command will generate the HTML file called powerreport.html Open the report in your favorite web browser.

sudo powertop --html=powerreport.html
Enter fullscreen mode Exit fullscreen mode

result.png

Tuning

sudo powertop
Enter fullscreen mode Exit fullscreen mode

The Tuning tab of the report shows the actual parameters suggested by the tool to apply to save power

For more information: https://wiki.archlinux.org/index.php/powertop

This article published on Hashnode

Top comments (2)

Collapse
 
aleon1220 profile image
Andres Leon

beautfiul article. Simple and effective. Is there something like this combined with top that you can check memory consumption by MB instead of KB?

Collapse
 
thamaraiselvam profile image
Thamaraiselvam

Thanks for feedback.
top -M M Command lists process by MB.