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"
8 mpstat \- report per-processor or per-processor-set statistics
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]]
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.
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:
31 <<processor 3 moved from pset: -1 to: 1>>
34 <<processors added: 1, 3>>
35 <<processors removed: 1, 3>>
42 The \fBmpstat\fR command reports the following information:
46 \fB\fBCPU\fR or \fBSET\fR\fR
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.
78 inter-processor cross-calls
96 interrupts as threads (not counting clock interrupt)
114 involuntary context switches
123 thread migrations (to another processor)
132 spins on mutexes (lock not acquired on first try)
141 spins on readers/writer locks (lock not acquired on first try)
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.
196 number of processors in the requested processor set
205 processor set membership of each \fBCPU\fR
211 The following options are supported:
218 Aggregate output by processor set. Sort the output by set. The default output
219 is sorted by \fBCPU\fR number.
228 Report processor set membership of each \fBCPU\fR. Sort the output by set. The
229 default output is sorted by \fBCPU\fR number.
235 \fB\fB-P\fR \fIset\fR\fR
238 Display only those processors in the specified \fIset\fR.
247 Suppress messages related to state changes.
253 \fB\fB-T\fR \fBu\fR | \fBd\fR\fR
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
267 Report once each \fIinterval\fR seconds.
276 Only print \fIcount\fR reports.
281 \fBExample 1 \fRUsing \fBmpstat\fR to Generate User and System Operation
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.
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
313 See \fBattributes\fR(5) for descriptions of the following attributes:
321 ATTRIBUTE TYPE ATTRIBUTE VALUE
323 Interface Stability See below.
328 Invocation is evolving. Human readable output is unstable.
332 \fBsar\fR(1), \fBdate\fR(1), \fBiostat\fR(1M), \fBsar\fR(1M), \fBvmstat\fR(1M),
333 \fBtime\fR(2), \fBattributes\fR(5)
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.