turbostat(8)
Display processor frequency, idle, and thermal statistics on modern Intel and AMD processors.
Synopsis
turbostat [OPTIONS] [interval [count]]Description
turbostat reports processor topology, frequency, idle, power, and temperature information for each logical CPU. It reads from /dev/cpu_dma_latency, /dev/msr, and ACPI tables to gather real-time performance metrics, making it essential for analyzing CPU behavior under load.
When run without options, turbostat displays a single snapshot. With an interval argument, it samples repeatedly at that rate (in seconds). Root privilege is required to access MSR (Model-Specific Register) data.
Common options
| Flag | What it does |
|---|---|
-p | print core and package C-state residency percentages |
-P | print per-package frequency using RAPL MSR data |
-S | print per-core Tj_Max and frequency |
-T | print temperature data (in Celsius) |
-c cpu_list | limit output to specified CPUs (e.g., 0,2-4) |
-C | print core frequency in MHz |
-d | disable demotion of C1 state to C1E sub-state |
-J | output in JSON format |
--quiet | suppress turbostat startup messages |
-o output_file | write output to specified file instead of stdout |
Examples
Display a single snapshot of all CPUs with frequency and C-state info
sudo turbostatSample CPU stats every 1 second for 10 iterations
sudo turbostat 1 10Show temperature and C-state residency every 2 seconds, 5 times
sudo turbostat -T -p 2 5Monitor only CPUs 0-3, sampling every second
sudo turbostat -c 0-3 1Output JSON-formatted stats every second for 60 seconds to a file
sudo turbostat -J -o stats.json 1 60Suppress startup messages and display first 20 lines of output
sudo turbostat --quiet 1 | head -20Show per-package frequency, temperatures, every 2 seconds
sudo turbostat -P -T 2