mpstat
also: multiprocessor statistics
A Linux command-line tool that displays per-CPU statistics, showing processor utilization, context switches, and interrupts in real-time or at intervals.
mpstat (multiprocessor statistics) is part of the sysstat package and provides detailed CPU performance metrics for each processor core on a multi-core system. It shows user time, system time, idle time, and other CPU states.
Unlike top or ps, which focus on processes, mpstat gives you a per-CPU breakdown. For example, mpstat 1 refreshes stats every second, and mpstat -P ALL shows individual CPU core statistics alongside the average across all cores.
Common use cases include identifying CPU bottlenecks, detecting uneven load distribution across cores, and monitoring context switches and interrupts to diagnose system contention or driver issues.