$linuxjunkies
>

powertop(8)

Monitor and analyze power consumption on Linux systems, identifying power-hungry processes and suggesting optimizations.

UbuntuDebianFedoraArch

Synopsis

powertop [OPTION]...

Description

powertop is a tool to diagnose issues with power consumption and power management on Linux systems. It measures the real power draw of CPU and other components, tracks which processes consume the most power, and provides recommendations for reducing power usage.

The tool displays real-time power consumption data, CPU frequency scaling information, wake-ups per second, and device power states. It can run in interactive mode or generate reports in various formats including HTML and CSV.

Common options

FlagWhat it does
-i, --interactiveStart in interactive mode (default); displays menu-driven interface for power analysis
-r, --reportGenerate a text report and exit; useful for logging power data
-h, --html=FILEGenerate an HTML report saved to FILE; requires running as root
-c, --csv=FILEGenerate a CSV report for data analysis and graphing
-t, --time=SECONDSSpecify measurement duration in seconds before generating report
-p, --pid=PIDMonitor a specific process by its process ID
-w, --workloadExecute a workload and measure its power consumption
--debugEnable debug output for troubleshooting measurement issues
-q, --quietSuppress verbose output; minimal text mode display
--versionDisplay version information and exit

Examples

Start powertop in interactive mode with real-time power analysis; requires root access

sudo powertop

Measure power consumption for 60 seconds and generate an HTML report

sudo powertop --time=60 --html=/tmp/power_report.html

Run powertop for a quick measurement and display a text report immediately

sudo powertop --report

Collect 30 seconds of power data in CSV format for analysis in spreadsheets

sudo powertop --time=30 --csv=/tmp/power_data.csv

Monitor power consumption of a specific process with PID 1234

sudo powertop -p 1234

Measure power consumption while running a CPU stress test workload

sudo powertop --workload 'stress --cpu 4 --timeout 30s'

Related commands