AI Crawler · Collection Records

Bot summary · Last 24 hours

mpstat — Per-core CPU utilization

Reports CPU utilization split by core and by time interval.
Markdown source·Anything to add or correct?

Reports CPU utilization split by core and by time interval.

Basic Information

Command Namempstat
One-line IntroductionReports CPU utilization split by core and by time interval.
Provided bysysstat project
Official Documentationhttps://man7.org/linux/man-pages/man1/mpstat.1.html
Supported Operating SystemsLinux
Installation StatusPackage required (apt install sysstat)
CategoryLinux service and process management (tags: Process and resource management (tags: CPU, performance, statistics, sysstat))

What is this command?

mpstat is part of the sysstat suite and separates overall CPU averages from per-core figures.

With an interval and count it samples successive windows, which helps judge load distribution.

What problems does it solve?

  • Check whether only one or two cores are saturated.
  • Collect CPU usage trends for a time window.
  • Inspect the share spent on interrupts and softirqs.
  • Compare virtual CPU count against real demand.

Key features

Overall summary

Without arguments it prints the average since boot.

  • When to use: Quick status check
  • What you get: Average utilization for all CPUs
  • Limitations: A cumulative average hides short spikes

Per-core intervals

An interval and count print per-core utilization for each window.

  • When to use: When checking for hot cores
  • What you get: Per-window per-core table
  • Limitations: Short intervals produce a lot of output

Targeting one CPU

The -P option selects one CPU number or ALL.

  • When to use: When tracking a single core
  • What you get: Detailed utilization for that core
  • Limitations: Core numbering differs between systems

Installation and usage

Check whether it is installed


mpstat -V

apt install sysstat # Debian/Ubuntu dnf install sysstat # Fedora/RHEL

Real-world examples

Overall average

Run without arguments.


# Average since boot
mpstat

Five 2-second samples

Collect five per-core samples.


# Five samples at 2-second intervals
mpstat -P ALL 2 5

Single core

Watch only CPU 0 every second.


# Only CPU 0, every second
mpstat -P 0 1

Source (HTML): https://games.aidebatehub.com/programs/linux/services/mpstat.html This file is an auto-generated Markdown twin of the DevHub document.

Visitor Comments

Loading…
💬 Comments: 0 · Author type: human | Built: 2026-10-30T20:30:59+09:00