6253 F_GETLK doesn't always return lock owner
[illumos-gate.git] / usr / src / man / man1m / mpstat.1m
blobc27913686593c8ffb314e890a493406cc342b824
1 '\" te
2 .\"  Copyright (c) 2004, Sun Microsystems, Inc.  All Rights Reserved
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.
4 .\"  See the License for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with
5 .\" the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH MPSTAT 1M "Mar 23, 2009"
7 .SH NAME
8 mpstat \- report per-processor or per-processor-set statistics
9 .SH SYNOPSIS
10 .LP
11 .nf
12 \fB/usr/bin/mpstat\fR [\fB-aq\fR] [\fB-p\fR | \fB-P\fR \fIset\fR] [\fB-T\fR u | d] [\fIinterval\fR [\fIcount\fR]]
13 .fi
15 .SH DESCRIPTION
16 .sp
17 .LP
18 The \fBmpstat\fR command reports processor statistics in tabular form. Each row
19 of the table represents the activity of one processor. The first table
20 summarizes all activity since boot. Each subsequent table summarizes activity
21 for the preceding interval. All values are rates listed as events per second
22 unless otherwise noted.
23 .sp
24 .LP
25 During execution of the kernel status command, the \fBstate\fR of the kernel
26 can change. If relevant, a state change message is included in the \fBmpstat\fR
27 output, in one of the following forms:
28 .sp
29 .in +2
30 .nf
31 <<processor 3 moved from pset: -1 to: 1>>
32 <<pset destroyed: 1>>
33 <<pset created: 1>>
34 <<processors added: 1, 3>>
35 <<processors removed: 1, 3>>
36 .fi
37 .in -2
38 .sp
40 .sp
41 .LP
42 The \fBmpstat\fR command reports the following information:
43 .sp
44 .ne 2
45 .na
46 \fB\fBCPU\fR or \fBSET\fR\fR
47 .ad
48 .RS 14n
49 Without the \fB-a\fR option, \fBmpstat\fR reports \fBCPU\fR statistics for a
50 processor ID. With the \fB-a\fR option, \fBmpstat\fR reports \fBSET\fR
51 statistics for a processor set ID.
52 .RE
54 .sp
55 .ne 2
56 .na
57 \fB\fBminf\fR\fR
58 .ad
59 .RS 14n
60 minor faults
61 .RE
63 .sp
64 .ne 2
65 .na
66 \fB\fBmjf\fR\fR
67 .ad
68 .RS 14n
69 major faults
70 .RE
72 .sp
73 .ne 2
74 .na
75 \fB\fBxcal\fR\fR
76 .ad
77 .RS 14n
78 inter-processor cross-calls
79 .RE
81 .sp
82 .ne 2
83 .na
84 \fB\fBintr\fR\fR
85 .ad
86 .RS 14n
87 interrupts
88 .RE
90 .sp
91 .ne 2
92 .na
93 \fB\fBithr\fR\fR
94 .ad
95 .RS 14n
96 interrupts as threads (not counting clock interrupt)
97 .RE
99 .sp
100 .ne 2
102 \fB\fBcsw\fR\fR
104 .RS 14n
105 context switches
109 .ne 2
111 \fB\fBicsw\fR\fR
113 .RS 14n
114 involuntary context switches
118 .ne 2
120 \fB\fBmigr\fR\fR
122 .RS 14n
123 thread migrations (to another processor)
127 .ne 2
129 \fB\fBsmtx\fR\fR
131 .RS 14n
132 spins on mutexes (lock not acquired on first try)
136 .ne 2
138 \fB\fBsrw\fR\fR
140 .RS 14n
141 spins on readers/writer locks (lock not acquired on first try)
145 .ne 2
147 \fB\fBsyscl\fR\fR
149 .RS 14n
150 system calls
154 .ne 2
156 \fB\fBusr\fR\fR
158 .RS 14n
159 percent user time
163 .ne 2
165 \fB\fBsys\fR\fR
167 .RS 14n
168 percent system time
172 .ne 2
174 \fB\fBwt\fR\fR
176 .RS 14n
177 the I/O wait time is no longer calculated as a percentage of \fBCPU\fR time,
178 and this statistic will always return zero.
182 .ne 2
184 \fB\fBidl\fR\fR
186 .RS 14n
187 percent idle time
191 .ne 2
193 \fB\fBsze\fR\fR
195 .RS 14n
196 number of processors in the requested processor set
200 .ne 2
202 \fB\fBset\fR\fR
204 .RS 14n
205 processor set membership of each \fBCPU\fR
208 .SH OPTIONS
211 The following options are supported:
213 .ne 2
215 \fB\fB-a\fR\fR
217 .RS 13n
218 Aggregate output by processor set. Sort the output by set. The default output
219 is sorted by \fBCPU\fR number.
223 .ne 2
225 \fB\fB-p\fR\fR
227 .RS 13n
228 Report processor set membership of each \fBCPU\fR. Sort the output by set. The
229 default output is sorted by \fBCPU\fR number.
233 .ne 2
235 \fB\fB-P\fR \fIset\fR\fR
237 .RS 13n
238 Display only those processors in the specified \fIset\fR.
242 .ne 2
244 \fB\fB-q\fR\fR
246 .RS 13n
247 Suppress messages related to state changes.
251 .ne 2
253 \fB\fB-T\fR \fBu\fR |  \fBd\fR\fR
255 .RS 13n
256 Specify \fBu\fR for a printed representation of the internal representation of
257 time. See \fBtime\fR(2). Specify \fBd\fR for standard date format. See
258 \fBdate\fR(1).
262 .ne 2
264 \fB\fIinterval\fR\fR
266 .RS 13n
267 Report once each \fIinterval\fR seconds.
271 .ne 2
273 \fB\fIcount\fR\fR
275 .RS 13n
276 Only print \fIcount\fR reports.
279 .SH EXAMPLES
281 \fBExample 1 \fRUsing \fBmpstat\fR to Generate User and System Operation
282 Statistics
285 The following command generates processor statistics over a five-second
286 interval in two reports. The command shows the processor set membership of each
287 \fBCPU\fR. The default output is sorted by \fBCPU\fR number, aggregated by
288 \fIprocessor set\fR, for user (\fBusr\fR) and system (\fBsys\fR) operations.
291 .in +2
293 example% \fBmpstat -ap 5 2\fR
296 SET minf mjf xcal intr ithr csw icsw migr smtx srw syscl usr sys wt idl sze
297   0    6   0  355  291  190  22    0    0    0   0    43   0   2  0  43   1
298   1   24  17  534  207  200  70    1    0    2   0   600   4   1  0  84   2
299   2   19   7  353  325  318  44    0    0    5   0   345   1   1  0  94   3
300   3   36   2  149  237  236  14    0    0    4   0    97   0   0  0  98   2
301 SET minf mjf xcal intr ithr csw icsw migr smtx srw syscl usr sys wt idl sze
302   0    1   0  720  405  304  55    0    0   18   0    12   0  15  0  81   1
303   1    0  69 1955  230  200 313   33    4   41   9  7086  34  10  0  19   2
304   2    0  46  685  314  300 203   11    0   54   1  5287  36   6  0  28   3
305   3    0   0   14  386  384   0    0    0    0   0     0   0   0  0 100   2
307 .in -2
310 .SH ATTRIBUTES
313 See \fBattributes\fR(5) for descriptions of the following attributes:
318 box;
319 c | c
320 l | l .
321 ATTRIBUTE TYPE  ATTRIBUTE VALUE
323 Interface Stability     See below.
328 Invocation is evolving. Human readable output is unstable.
329 .SH SEE ALSO
332 \fBsar\fR(1), \fBdate\fR(1), \fBiostat\fR(1M), \fBsar\fR(1M), \fBvmstat\fR(1M),
333 \fBtime\fR(2), \fBattributes\fR(5)
334 .SH NOTES
337 The sum of \fBCPU\fR utilization might vary slightly from 100 due to rounding
338 errors in the production of a percentage figure.
341 The total time used for \fBCPU\fR processing is the sum of \fBusr\fR and
342 \fBsys\fR output values, reported for user and system operations. The \fBidl\fR
343 value reports the time that the \fBCPU\fR is idle for any reason other than
344 pending disk I/O operations.
347 Run the \fBiostat\fR command with the \fB-x\fR option to report I/O service
348 times in \fBsvc_t\fR output. The \fBiostat\fR utility also reports the same
349 \fBwt\fR, user (\fBus\fR), and system (\fBsy\fR) statistics. See
350 \fBiostat\fR(1M) for more information.
353 When executing in a \fBzone\fR and if the pools facility is active,
354 \fBmpstat\fR(1M) will only provide information for those processors which are a
355 member of the processor set of the pool to which the \fBzone\fR is bound.