Powertop - Monitor the power consumption of your Linux system running on Intel platforms
We all are excited about saving energy and serving the environment but we don't realize that we can start from the things right beside us, for example, the computer. There are a lot of things going on in a computer which keeps consuming power. Based upon the load, the consumption could be high or low, but even when you think that your computer is doing nothing, there could be a hundred of things going on(some could be useless) that consume/waste energy. This specially sucks when your laptop is on battery power. PowerTop, a project to save power on Intel platforms running Linux, lets you know the state of your system w.r.t. power consumption, a sorted list of the most contributing culprits(apps/interrupts) and some suggestions to make your system more eco-friendly.
Not just for increasing battery life, powertop can help you figure out bugs or flaws in the system and fixing them can help you save a lot of energy and in case of large data centers with thousands of machines, it could directly result in significant reduction in costs of electricity and chip heating issues.
Download and install Powertop
You can directly download and install it from your Distribution's repositories.
[shredder12]$ sudo apt-get install powertop # for Debian/Ubuntu users
[root]# yum install powertop #for RedHat/Fedora users
Please note that, the distribution may contain, an older version. Ubuntu 10.10, has v1.13 which is quite old considering the latest being v1.7. You can install them directly from the source to get the recent version.
Once installed, run it in a terminal.
[shredder12]$ sudo powertop # you will need root privileges
Here is a brief explanation of the output. The c-state shows the amount of time processor has spent in each of the 4 states. The processor is in states 1-4 when its idle. The longer it stays in higher states, C3/C4, the less power is being consumed. And Except in state C0, it doesn't execute instructions in any other.
Wake up per second is another criteria to check the power savings, the lower the better. Next is the list of top contributors (processes etc.) in order of power consumption. Lastly, it might even suggest you some tips and tricks to save some power.
When on battery, using ACPI it will show the state of the battery, hours remaining etc.
Because of Powertop, many crucial bugs in both kernel and various applications have been fixed that wasted a lot of power. You can read more about them here.