powerstat is a command-line utility for measuring power consumption and relating those measurements to system activity. Its output follows a vmstat-like format, making it useful for observing power draw alongside processor load and other operating statistics over a sequence of samples.
Power measurements can be derived from battery information or, on compatible Intel systems, from Running Average Power Limit interfaces. RAPL data can expose several processor-related power domains, while battery measurements are useful for estimating the consumption of a complete portable system.
The sampling interval and duration can be controlled to suit short comparisons or longer observations.
This is free and open source software.
Key Features
- Measure power consumption using battery statistics.
- Use Intel RAPL power domains as an alternative measurement source on supported hardware.
- Display processor utilization alongside power readings.
- Calculate average, standard deviation, minimum and maximum power consumption over a run.
- Calculate a geometric mean for gathered measurements.
- Show individual RAPL power-domain readings when requested.
- Gather CPU C-state residency and transition information.
- Calculate frequency information across online CPU cores.
- Report available thermal-zone temperatures.
- Generate a histogram of collected power measurements.
- Report GPU frequency information for the primary graphics device where supported.
- Resample readings when the system is considered too busy for a representative idle measurement.
- Allow the CPU-idle threshold used for resampling to be configured.
- Detect process fork, execution and exit activity when run with suitable privileges.
- Log process activity at the end of a measurement run.
- Control the sampling interval, initial settling delay and number of measurements from the command line.
Website: github.com/ColinIanKing/powerstat
Support:
Developer: Colin Ian King
License: GNU General Public License v2.0

powerstat is written in C. Learn C with our recommended free books and free tutorials.
Related Software
| Power Consumption Tools | |
|---|---|
| TLP | Power management package; features in Essential System Tools |
| auto-cpufreq | Automatic CPU speed and power optimizer |
| RyzenAdj | Adjusts AMD Ryzen APU thermal, current and wattage limits |
| PowerTOP | Enable various powersaving modes |
| TLP UI | GTK interface to review and modify TLP configuration |
| cpupower | Linux kernel tool |
| power-profiles-daemon | Makes power profiles handling available over D-Bus |
| cpupower-gui | Tool to set CPU frequency limits |
| batctl | Battery charge threshold manager for Linux laptops |
| TuneD | Daemon for monitoring and adaptive tuning of system devices |
| asusctl | Control aspects of ASUS laptops |
| system76-power | Utility for managing graphics and power profiles |
| jolt | Terminal-based battery and energy monitor |
| thermald | Thermal daemon for Intel Architecture |
| powerstat | Measures the power consumption of a laptop |
| LACT | Linux GPU Control Application |
| pstate-frequency | Controls CPU frequencies, governors and turbo boost modes |
| Wattage | Monitor the health and status of power devices |
| Power Options | Graphical profiles for tuning CPU, GPU and device energy use |
| PowerDevil | Controls brightness, battery behaviour and sleep in KDE Plasma |
Read our verdict in the software roundup.
LinuxLinks helps you discover the best free and open source software for Linux. Explore our extensive collection of recommended applications, including alternatives to popular proprietary software.We also publish software reviews, Linux tutorials, hardware reviews, free programming books and articles covering the wider open source community. Browse our Linux resources to discover more. Know a useful free and open source Linux application we haven't covered? Suggest a program for inclusion. Has your software been featured on LinuxLinks? Display one of our Featured on LinuxLinks badges on your website or GitHub README. |


Please read our Comment Policy before commenting.