Per-Core CPU Stats With mpstat

Report usage for every logical CPU over time.

LinuxProcessesmonitoringperformanceLow risk
Run mpstat -P ALL 1 5 to sample each CPU once per second for five seconds.

01Command

Command
$ mpstat -P ALL 1 5

02What it does

Average CPU graphs hide single-threaded bottlenecks, but mpstat shows each core's idle, iowait and system time separately. That detail is what tells you whether to parallelize or investigate I/O, and it is built for scripted sampling.

03Risk

RiskLow risk
Requirementssudo apt install sysstat
!Warning: The first sample is an average since boot; judge from the subsequent interval rows.

04Undo

✓No undo needed — this command does not change persistent state.

05Sources

Last verified: 2026-10-13 · Category: System & Settings

06Related solutions