Saving power is one of the major concerns of the modern world. You see cities observing Earth Hours, studies showing how computers consume excess power when kept running and so on. Even if you would view it from your personal perspective, saving power can make your laptop batteries last longer and provide longer battery backup.
It is important to measure power consumption in operating system especially when you try to maximize the battery life of your laptop, or reduce the energy bill of rack-mounted servers in a data center. Power usage monitor can also be helpful to diagnose issues with power management, or even buggy behaviors of applications.
In this post, I will describe how to monitor power usage in Linux operating system.
For Linux-based systems, you can use PowerTop, an ncurses-based command-line tool developed by Intel to monitor process-level power consumption, and to provide suggestions to optimize power management. PowerTop supports Intel, AMD, ARM, and UltraSparc processors while it is the most reliable on Intel processors for the obvious reason.
PowerTop not only monitors the power consumption but also provides you with detailed information on how you can minimize the consumption. An indispensable tool for laptop users especially.
To install PowerTop on CentOS, Fedora or RHEL:
yum install powertop