1MPSTAT(1) Linux User's Manual MPSTAT(1)
2
3
4
6 mpstat - Report processors related statistics.
7
9 mpstat [ -P { cpu | ALL } ] [ -V ] [ interval [ count ] ]
10
12 The mpstat command writes to standard output activities for each avail‐
13 able processor, processor 0 being the first one. Global average activ‐
14 ities among all processors are also reported. The mpstat command can
15 be used both on SMP and UP machines, but in the latter, only global
16 average activities will be printed.
17
18 The interval parameter specifies the amount of time in seconds between
19 each report. A value of 0 (or no parameters at all) indicates that
20 processors statistics are to be reported for the time since system
21 startup (boot). The count parameter can be specified in conjunction
22 with the interval parameter if this one is not set to zero. The value
23 of count determines the number of reports generated at interval seconds
24 apart. If the interval parameter is specified without the count parame‐
25 ter, the mpstat command generates reports continuously.
26
27
29 The report generated by the mpstat command has the following format:
30
31 CPU
32 Processor number. The keyword all indicates that statistics are
33 calculated as averages among all processors.
34 %user
35 Show the percentage of CPU utilization that occurred while exe‐
36 cuting at the user level (application).
37 %nice
38 Show the percentage of CPU utilization that occurred while exe‐
39 cuting at the user level with nice priority.
40 %sys
41 Show the percentage of CPU utilization that occurred while exe‐
42 cuting at the system level (kernel). Note that this does not
43 include time spent servicing interrupts or softirqs.
44 %iowait
45 Show the percentage of time that the CPU or CPUs were idle dur‐
46 ing which the system had an outstanding disk I/O request.
47 %irq
48 Show the percentage of time spent by the CPU or CPUs to service
49 interrupts.
50 %soft
51 Show the percentage of time spent by the CPU or CPUs to service
52 softirqs. A softirq (software interrupt) is one of up to 32
53 enumerated software interrupts which can run on multiple CPUs at
54 once.
55 %steal
56 Show the percentage of time spent in involuntary wait by the
57 virtual CPU or CPUs while the hypervisor was servicing another
58 virtual processor.
59 %idle
60 Show the percentage of time that the CPU or CPUs were idle and
61 the system did not have an outstanding disk I/O request.
62 intr/s
63 Show the total number of interrupts received per second by the
64 CPU or CPUs.
65
66 Note: On SMP machines a processor that does not have any activity at
67 all is a disabled (offline) processor.
68
69
71 -P { cpu | ALL }
72 Indicate the processor number for which statistics are to be
73 reported. cpu is the processor number. Note that processor 0 is
74 the first processor. The ALL keyword indicates that statistics
75 are to be reported for all processors.
76
77 -V Print version number then exit.
78
79
81 The mpstat command takes into account the following environment vari‐
82 able:
83
84
85 S_TIME_FORMAT
86 If this variable exists and its value is ISO then the current
87 locale will be ignored when printing the date in the report
88 header. The mpstat command will use the ISO 8601 format (YYYY-
89 MM-DD) instead.
90
91
93 mpstat 2 5
94 Display five reports of global statistics among all processors
95 at two second intervals.
96
97 mpstat -P ALL 2 5
98 Display five reports of statistics for all processors at two
99 second intervals.
100
101
103 /proc filesystem must be mounted for the mpstat command to work.
104
105 On SMP machines mpstat assumes that CPU #0 is never disabled. Indeed
106 mpstat uses it to calculate the time interval.
107
108 Only a few activities are supplied by the Linux kernel for each proces‐
109 sor.
110
111
113 /proc contains various files with system statistics.
114
115
117 Sebastien Godard (sysstat <at> wanadoo.fr)
118
120 sar(1), sadc(8), sa1(8), sa2(8), sadf(1), iostat(1), vmstat(8)
121
122 http://perso.orange.fr/sebastien.godard/
123
124
125
126Linux OCTOBER 2006 MPSTAT(1)