my-server
← Wiki

Mpstat

mpstat is a computer command-line software used in Unix-type operating systems to report (on the screen) processor-related statistics. It is used in computer monitoring in order to diagnose problems or to build statistics about a computer's CPU usage.

Description

The mpstat command writes to standard output activities for each available processor.

The mpstat command can be used both on SMP and UP machines, but in the latter, only global average activities will be printed.

Usage

<pre> $ mpstat <interval> <count> </pre>

Interval is the time in seconds between printing out a line of statistics. Count is the number of lines of output you want.

Note that the first line of output from mpstat (like iostat, vmstat, etc.) contains averages since system boot. The subsequent lines will show current values.

Examples

Different examples of output under different operating systems:

under Linux kernel 4.14 on a two CPU machine:

under Linux kernel 2.4:

under Solaris 11:

under AIX 6:

See also

References

External links