Linux CPU Power

turbostat — CPU frequency, C-states, and power telemetry

turbostat reports CPU frequency, idle states (C-states), turbo boost behavior, and related power/performance counters. It’s especially useful on Intel CPUs (and works on many systems via kernel interfaces).

What turbostat is good for

Tip: Run turbostat with sudo for best access to counters.

Install

On many distros, turbostat is part of the linux-tools package set. Package names vary by distro and kernel version.

# Debian/Ubuntu (common)
sudo apt install linux-tools-common linux-tools-$(uname -r)

# Fedora/RHEL (common)
sudo dnf install kernel-tools

# Arch (common)
sudo pacman -S linux-tools

10 Practical Examples

1) Run turbostat with defaults

sudo turbostat

Shows a live summary of CPU power/perf stats.

2) Update every 1 second

sudo turbostat --interval 1

Shorter interval helps spot spikes and turbo transitions.

3) Run for 10 samples then exit

sudo turbostat --interval 1 --num_iterations 10

Good for quick benchmarking or “before/after” comparisons.

4) Measure a command and exit when it finishes

sudo turbostat -- make -j$(nproc)

Runs the command while collecting telemetry, then prints totals.

5) Save output to a file (CSV-like)

sudo turbostat --interval 1 --num_iterations 60 > turbostat_60s.txt

Capture a 1-minute window for analysis.

6) Watch C-state residency during idle

sudo turbostat --interval 2

Let the system sit idle and observe deep C-state percentages.

7) Compare governor changes

# Example: change governor (if using cpufreq)
sudo cpupower frequency-set -g powersave
sudo turbostat --interval 1 --num_iterations 10

sudo cpupower frequency-set -g performance
sudo turbostat --interval 1 --num_iterations 10

See how frequency and residency differ.

8) Check package vs core behavior

sudo turbostat --interval 1

Look at “PkgWatt” and per-core frequencies to spot imbalances.

9) Reduce columns (focus on key stats)

sudo turbostat --Summary --interval 1

Show summary-focused view (options differ slightly by version).

10) Pair with powertop for tuning validation

sudo powertop --auto-tune
sudo turbostat --interval 1 --num_iterations 20

Apply tunings then confirm improved idle residency / reduced power.

Notes & Gotchas