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, ...
Get Linux Shell Scripting Cookbook - Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.