1MPSTAT(1)                     Linux User's Manual                    MPSTAT(1)
2
3
4

NAME

6       mpstat - Report processors related statistics.
7

SYNOPSIS

9       mpstat  [ -A ] [ -I { SUM | CPU | ALL } ] [ -u ] [ -P { cpu [,...] | ON
10       | ALL } ] [ -V ] [ interval [ count ] ]
11

DESCRIPTION

13       The mpstat command writes to standard output activities for each avail‐
14       able processor, processor 0 being the first one.  Global average activ‐
15       ities among all processors are also reported.  The mpstat  command  can
16       be  used  both  on  SMP and UP machines, but in the latter, only global
17       average activities will be printed. If no activity has  been  selected,
18       then the default report is the CPU utilization report.
19
20       The  interval parameter specifies the amount of time in seconds between
21       each report.  A value of 0 (or no parameters  at  all)  indicates  that
22       processors  statistics  are  to  be  reported for the time since system
23       startup (boot).  The count parameter can be  specified  in  conjunction
24       with  the  interval parameter if this one is not set to zero. The value
25       of count determines the number of reports generated at interval seconds
26       apart. If the interval parameter is specified without the count parame‐
27       ter, the mpstat command generates reports continuously.
28
29

OPTIONS

31       -A     This option is equivalent to specifying -I ALL -u -P ALL
32
33       -I { SUM | CPU | ALL }
34              Report interrupts statistics.
35
36              With the SUM keyword, the mpstat command reports the total  num‐
37              ber  of interrupts per processor.  The following values are dis‐
38              played:
39
40              CPU
41                     Processor number. The keyword all indicates that  statis‐
42                     tics are calculated as averages among all processors.
43
44              intr/s
45                     Show  the  total number of interrupts received per second
46                     by the CPU or CPUs.
47
48              With the CPU keyword, the number of  each  individual  interrupt
49              received per second by the CPU or CPUs is displayed.
50
51              The  ALL  keyword  is  equivalent to specifying all the keywords
52              above and therefore all the interrupts statistics are displayed.
53
54       -P { cpu [,...] | ON | ALL }
55              Indicate the processor number for which  statistics  are  to  be
56              reported.  cpu is the processor number. Note that processor 0 is
57              the first processor.  The ON keyword indicates  that  statistics
58              are  to  be reported for every online processor, whereas the ALL
59              keyword indicates that statistics are to  be  reported  for  all
60              processors.
61
62       -u     Report CPU utilization. The following values are displayed:
63
64              CPU
65                     Processor  number. The keyword all indicates that statis‐
66                     tics are calculated as averages among all processors.
67
68              %usr
69                     Show the percentage  of  CPU  utilization  that  occurred
70                     while executing at the user level (application).
71
72              %nice
73                     Show  the  percentage  of  CPU  utilization that occurred
74                     while executing at the user level with nice priority.
75
76              %sys
77                     Show the percentage  of  CPU  utilization  that  occurred
78                     while  executing  at the system level (kernel). Note that
79                     this does not include time spent servicing  hardware  and
80                     software interrupts.
81
82              %iowait
83                     Show  the  percentage  of  time that the CPU or CPUs were
84                     idle during which the system had an outstanding disk  I/O
85                     request.
86
87              %irq
88                     Show  the  percentage of time spent by the CPU or CPUs to
89                     service hardware interrupts.
90
91              %soft
92                     Show the percentage of time spent by the CPU or  CPUs  to
93                     service software interrupts.
94
95              %steal
96                     Show  the percentage of time spent in involuntary wait by
97                     the virtual CPU or CPUs while the hypervisor was  servic‐
98                     ing another virtual processor.
99
100              %guest
101                     Show  the  percentage of time spent by the CPU or CPUs to
102                     run a virtual processor.
103
104              %idle
105                     Show the percentage of time that the  CPU  or  CPUs  were
106                     idle  and the system did not have an outstanding disk I/O
107                     request.
108
109              Note: On SMP machines a processor that does not have any  activ‐
110              ity at all is a disabled (offline) processor.
111
112       -V     Print version number then exit.
113
114

ENVIRONMENT

116       The  mpstat  command takes into account the following environment vari‐
117       able:
118
119
120       S_TIME_FORMAT
121              If this variable exists and its value is ISO  then  the  current
122              locale  will  be  ignored  when  printing the date in the report
123              header.  The mpstat command will use the ISO 8601 format  (YYYY-
124              MM-DD) instead.
125
126

EXAMPLES

128       mpstat 2 5
129              Display  five  reports of global statistics among all processors
130              at two second intervals.
131
132       mpstat -P ALL 2 5
133              Display five reports of statistics for  all  processors  at  two
134              second intervals.
135
136

BUGS

138       /proc filesystem must be mounted for the mpstat command to work.
139
140       Only a few activities are given by the Linux kernel for each processor.
141
142

FILES

144       /proc contains various files with system statistics.
145
146

AUTHOR

148       Sebastien Godard (sysstat <at> orange.fr)
149

SEE ALSO

151       sar(1), pidstat(1), iostat(1), vmstat(8)
152
153       http://pagesperso-orange.fr/sebastien.godard/
154
155
156
157Linux                              MAY 2009                          MPSTAT(1)
Impressum