-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating
Linux Shell Scripting Cookbook, Second Edition - Second Edition
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.
powertop doesn't come preinstalled with most Linux distributions, you will have to install it using your package manager.
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 filename PowerTOP.html, which you can open using any...
Change the font size
Change margin width
Change background colour