powerstat – measure machine power consumption

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 options

powerstat is written in C. Learn C with our recommended free books and free tutorials.


Related Software

Power Consumption Tools
TLPPower management package; features in Essential System Tools
auto-cpufreqAutomatic CPU speed and power optimizer
PowerTOPEnable various powersaving modes
cpupowerLinux kernel tool
power-profiles-daemonMakes power profiles handling available over D-Bus
cpupower-guiTool to set CPU frequency limits
batctlBattery charge threshold manager for Linux laptops
TuneDDaemon for monitoring and adaptive tuning of system devices
asusctlControl aspects of ASUS laptops
system76-powerUtility for managing graphics and power profiles
joltTerminal-based battery and energy monitor
thermaldThermal daemon for Intel Architecture
powerstatMeasures the power consumption of a laptop
LACTLinux GPU Control Application
CPUFreqSystem monitor and power manager
WattageMonitor the health and status of power devices
ddogreenSmart power management tool

Read our verdict in the software roundup.


Best Free and Open Source Software Explore our carefully curated directory of recommended free and open source software, covering every major software category.

The directory forms part of our extensive collection of articles for Linux enthusiasts. It includes hundreds of detailed reviews, together with free and open source alternatives to proprietary software from companies such as Google, Microsoft, Apple, Adobe, IBM, Cisco, Oracle, and Autodesk.

LinuxLinks also covers interesting projects worth exploring, Linux-compatible hardware, free programming books and tutorials, and much more.

Know a useful free and open source Linux application that we haven’t covered? Tell us about it using our submission form.
Subscribe

Please read our Comment Policy before commenting.

Notify of
guest
0 Comments
Oldest
Newest Most Voted