Skip to content

SYSTEM Cited by 1 source

mpstat

What it is

mpstat reports per-CPU CPU time statistics. Ships in the sysstat package. Where vmstat's CPU columns are system-wide averages, mpstat gives the per-CPU breakdown — critical for identifying workloads that hammer one or two cores while the rest idle.

Canonical invocation

mpstat -P ALL 1
  • -P ALL — one row per CPU + one aggregate row.
  • 1 — one-second samples.

Key output columns

The columns match the CPU time breakdown: %usr / %nice / %sys / %iowait / %irq / %soft / %steal / %guest / %gnice / %idle.

What mpstat shows that vmstat hides

  • Single-hot-CPU patterns. A single-threaded application consuming a whole core while 31 other cores idle looks like ~3% system-wide CPU utilisation on vmstat but 100% on one row of mpstat.
  • Interrupt affinity issues. One CPU handling all network interrupts (%soft pegged on CPU 0) is a common kernel-tuning pathology invisible to system-wide tools.
  • NUMA effects. Memory-bus-saturated workloads sometimes show per-CPU %sys skew that tracks NUMA-node-local memory exhaustion.

Interpretation rule from the Netflix checklist

This command prints CPU time breakdowns per CPU, which can be used to check for an imbalance. A single hot CPU can be evidence of a single-threaded application.

Seen in

Last updated · 319 distilled / 1,201 read