]> granicus.if.org Git - sysstat/blob - man/mpstat.1
Add S_COLORS variable definition in man pages
[sysstat] / man / mpstat.1
1 .TH MPSTAT 1 "SEPTEMBER 2015" Linux "Linux User's Manual" -*- nroff -*-
2 .SH NAME
3 mpstat \- Report processors related statistics.
4 .SH SYNOPSIS
5 .B mpstat [ -A ] [ -u ] [ -V ] [ -I { SUM | CPU | SCPU | ALL } ] [ -P {
6 .I cpu
7 .B [,...] | ON | ALL } ] [
8 .I interval
9 .B [
10 .I count
11 .B ] ]
12 .SH DESCRIPTION
13 The
14 .B mpstat
15 command writes to standard output activities for each available processor,
16 processor 0 being the first one.
17 Global average activities among all processors are also reported.
18 The
19 .B mpstat
20 command can be used both on SMP and UP machines, but in the latter, only global
21 average activities will be printed. If no activity has been selected, then the
22 default report is the CPU utilization report.
23
24 The
25 .I interval
26 parameter specifies the amount of time in seconds between each report.
27 A value of 0 (or no parameters at all) indicates that processors statistics are
28 to be reported for the time since system startup (boot).
29 The
30 .I count
31 parameter can be specified in conjunction with the
32 .I interval
33 parameter if this one is not set to zero. The value of
34 .I count
35 determines the number of reports generated at
36 .I interval
37 seconds apart. If the
38 .I interval
39 parameter is specified without the
40 .I count
41 parameter, the
42 .B mpstat
43 command generates reports continuously.
44
45 .SH OPTIONS
46 .IP -A
47 This option is equivalent to specifying
48 .BR "-u -I ALL -P ALL"
49 .IP "-I { SUM | CPU | SCPU | ALL }"
50 Report interrupts statistics.
51
52 With the
53 .B SUM
54 keyword, the
55 .B mpstat
56 command reports the total number of interrupts per processor.
57 The following values are displayed:
58
59 .B CPU
60 .RS
61 .RS
62 Processor number. The keyword
63 .I all
64 indicates that statistics are calculated as averages among all
65 processors.
66 .RE
67
68 .B intr/s
69 .RS
70 Show the total number of interrupts received per second by
71 the CPU or CPUs.
72 .RE
73
74 With the
75 .B CPU
76 keyword, the number of each individual interrupt received per
77 second by the CPU or CPUs is displayed. Interrupts are those listed
78 in /proc/interrupts file.
79
80 With the
81 .B SCPU
82 keyword, the number of each individual software interrupt received per
83 second by the CPU or CPUs is displayed. This option works only
84 with kernels 2.6.31 and later. Software interrupts are those listed
85 in /proc/softirqs file.
86
87 The
88 .B ALL
89 keyword is equivalent to specifying all the keywords above and
90 therefore all the interrupts statistics are displayed.
91 .RE
92 .RE
93 .IP "-P { cpu [,...] | ON | ALL }"
94 Indicate the processor number for which statistics are to be reported.
95 .I cpu
96 is the processor number. Note that processor 0 is the first processor.
97 The
98 .B ON
99 keyword indicates that statistics are to be reported for every
100 online processor, whereas the
101 .B ALL
102 keyword indicates that statistics are to be reported for all processors.
103 .IP -u
104 Report CPU utilization. The following values are displayed:
105
106 .B CPU
107 .RS
108 .RS
109 Processor number. The keyword
110 .I all
111 indicates that statistics are calculated as averages among all
112 processors.
113 .RE
114
115 .B %usr
116 .RS
117 Show the percentage of CPU utilization that occurred while
118 executing at the user level (application).
119 .RE
120
121 .B %nice
122 .RS
123 Show the percentage of CPU utilization that occurred while
124 executing at the user level with nice priority.
125 .RE
126
127 .B %sys
128 .RS
129 Show the percentage of CPU utilization that occurred while
130 executing at the system level (kernel). Note that this does not
131 include time spent servicing hardware and software interrupts.
132 .RE
133
134 .B %iowait
135 .RS
136 Show the percentage of time that the CPU or CPUs were idle during which
137 the system had an outstanding disk I/O request.
138 .RE
139
140 .B %irq
141 .RS
142 Show the percentage of time spent by the CPU or CPUs to service hardware
143 interrupts.
144 .RE
145
146 .B %soft
147 .RS
148 Show the percentage of time spent by the CPU or CPUs to service software
149 interrupts.
150 .RE
151
152 .B %steal
153 .RS
154 Show the percentage of time spent in involuntary wait by the virtual CPU
155 or CPUs while the hypervisor was servicing another virtual processor.
156 .RE
157
158 .B %guest
159 .RS
160 Show the percentage of time spent by the CPU or CPUs to run a virtual
161 processor.
162 .RE
163
164 .B %gnice
165 .RS
166 Show the percentage of time spent by the CPU or CPUs to run a niced
167 guest.
168 .RE
169
170 .B %idle
171 .RS
172 Show the percentage of time that the CPU or CPUs were idle and the system
173 did not have an outstanding disk I/O request.
174 .RE
175
176 Note: On SMP machines a processor that does not have any activity at all
177 is a disabled (offline) processor.
178 .RE
179 .IP -V
180 Print version number then exit.
181
182 .SH ENVIRONMENT
183 The
184 .B mpstat
185 command takes into account the following environment variable:
186
187 .IP S_COLORS
188 When this variable is set, display statistics in color on the terminal.
189
190 .IP S_TIME_FORMAT
191 If this variable exists and its value is
192 .BR ISO
193 then the current locale will be ignored when printing the date in the report header.
194 The
195 .B mpstat
196 command will use the ISO 8601 format (YYYY-MM-DD) instead.
197
198 .SH EXAMPLES
199 .B mpstat 2 5
200 .RS
201 Display five reports of global statistics among all processors at two second intervals.
202 .RE
203
204 .B mpstat -P ALL 2 5
205 .RS
206 Display five reports of statistics for all processors at two second intervals.
207
208 .SH BUGS
209 .I /proc
210 filesystem must be mounted for the
211 .B mpstat
212 command to work.
213
214 Only a few activities are given by the Linux kernel for each processor.
215
216 .SH FILES
217 .IR /proc
218 contains various files with system statistics.
219
220 .SH AUTHOR
221 Sebastien Godard (sysstat <at> orange.fr)
222 .SH SEE ALSO
223 .BR sar (1),
224 .BR pidstat (1),
225 .BR iostat (1),
226 .BR vmstat (8)
227
228 .I http://pagesperso-orange.fr/sebastien.godard/