Measuring and optimizing power usage
Power consumption is one of the factors that one must keep on monitoring, especially on mobile devices, such as notebook computers, tablets, and so on. There are few tools available for Linux systems to measure power consumption, one such command is powertop
which we are going to use for this recipe.
Getting ready
powertop
doesn't come preinstalled with most Linux distributions, you will have to install it using your package manager.
How to do it...
Let's see how to use powertop
to measure and optimize power consumption:
Using
powertop
is pretty easy, just run:# powertop
powertop
will start taking some measurements and once it's done, it will show a screen which will have detailed information about power usage, the processes using the most power, and so on:For generating HTML reports, use:
# powertop --html
powertop
will take measurements over a period of time and generate an HTML report with the default filenamePowerTOP.html
, which you can open using any...