'\" te .\" Copyright (c) 2004, Sun Microsystems, Inc. All Rights Reserved .\" 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. .\" 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 .\" the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] .TH mpstat 1M "23 Mar 2009" "SunOS 5.11" "System Administration Commands" .SH NAME mpstat \- report per-processor or per-processor-set statistics .SH SYNOPSIS .LP .nf \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]] .fi .SH DESCRIPTION .sp .LP The \fBmpstat\fR command reports processor statistics in tabular form. Each row of the table represents the activity of one processor. The first table summarizes all activity since boot. Each subsequent table summarizes activity for the preceding interval. All values are rates listed as events per second unless otherwise noted. .sp .LP During execution of the kernel status command, the \fBstate\fR of the kernel can change. If relevant, a state change message is included in the \fBmpstat\fR output, in one of the following forms: .sp .in +2 .nf <> <> <> <> <> .fi .in -2 .sp .sp .LP The \fBmpstat\fR command reports the following information: .sp .ne 2 .mk .na \fB\fBCPU\fR or \fBSET\fR\fR .ad .RS 14n .rt Without the \fB-a\fR option, \fBmpstat\fR reports \fBCPU\fR statistics for a processor ID. With the \fB-a\fR option, \fBmpstat\fR reports \fBSET\fR statistics for a processor set ID. .RE .sp .ne 2 .mk .na \fB\fBminf\fR\fR .ad .RS 14n .rt minor faults .RE .sp .ne 2 .mk .na \fB\fBmjf\fR\fR .ad .RS 14n .rt major faults .RE .sp .ne 2 .mk .na \fB\fBxcal\fR\fR .ad .RS 14n .rt inter-processor cross-calls .RE .sp .ne 2 .mk .na \fB\fBintr\fR\fR .ad .RS 14n .rt interrupts .RE .sp .ne 2 .mk .na \fB\fBithr\fR\fR .ad .RS 14n .rt interrupts as threads (not counting clock interrupt) .RE .sp .ne 2 .mk .na \fB\fBcsw\fR\fR .ad .RS 14n .rt context switches .RE .sp .ne 2 .mk .na \fB\fBicsw\fR\fR .ad .RS 14n .rt involuntary context switches .RE .sp .ne 2 .mk .na \fB\fBmigr\fR\fR .ad .RS 14n .rt thread migrations (to another processor) .RE .sp .ne 2 .mk .na \fB\fBsmtx\fR\fR .ad .RS 14n .rt spins on mutexes (lock not acquired on first try) .RE .sp .ne 2 .mk .na \fB\fBsrw\fR\fR .ad .RS 14n .rt spins on readers/writer locks (lock not acquired on first try) .RE .sp .ne 2 .mk .na \fB\fBsyscl\fR\fR .ad .RS 14n .rt system calls .RE .sp .ne 2 .mk .na \fB\fBusr\fR\fR .ad .RS 14n .rt percent user time .RE .sp .ne 2 .mk .na \fB\fBsys\fR\fR .ad .RS 14n .rt percent system time .RE .sp .ne 2 .mk .na \fB\fBwt\fR\fR .ad .RS 14n .rt the I/O wait time is no longer calculated as a percentage of \fBCPU\fR time, and this statistic will always return zero. .RE .sp .ne 2 .mk .na \fB\fBidl\fR\fR .ad .RS 14n .rt percent idle time .RE .sp .ne 2 .mk .na \fB\fBsze\fR\fR .ad .RS 14n .rt number of processors in the requested processor set .RE .sp .ne 2 .mk .na \fB\fBset\fR\fR .ad .RS 14n .rt processor set membership of each \fBCPU\fR .RE .SH OPTIONS .sp .LP The following options are supported: .sp .ne 2 .mk .na \fB\fB-a\fR\fR .ad .RS 13n .rt Aggregate output by processor set. Sort the output by set. The default output is sorted by \fBCPU\fR number. .RE .sp .ne 2 .mk .na \fB\fB-p\fR\fR .ad .RS 13n .rt Report processor set membership of each \fBCPU\fR. Sort the output by set. The default output is sorted by \fBCPU\fR number. .RE .sp .ne 2 .mk .na \fB\fB-P\fR \fIset\fR\fR .ad .RS 13n .rt Display only those processors in the specified \fIset\fR. .RE .sp .ne 2 .mk .na \fB\fB-q\fR\fR .ad .RS 13n .rt Suppress messages related to state changes. .RE .sp .ne 2 .mk .na \fB\fB-T\fR \fBu\fR | \fBd\fR\fR .ad .RS 13n .rt Specify \fBu\fR for a printed representation of the internal representation of time. See \fBtime\fR(2). Specify \fBd\fR for standard date format. See \fBdate\fR(1). .RE .sp .ne 2 .mk .na \fB\fIinterval\fR\fR .ad .RS 13n .rt Report once each \fIinterval\fR seconds. .RE .sp .ne 2 .mk .na \fB\fIcount\fR\fR .ad .RS 13n .rt Only print \fIcount\fR reports. .RE .SH EXAMPLES .LP \fBExample 1 \fRUsing \fBmpstat\fR to Generate User and System Operation Statistics .sp .LP The following command generates processor statistics over a five-second interval in two reports. The command shows the processor set membership of each \fBCPU\fR. The default output is sorted by \fBCPU\fR number, aggregated by \fIprocessor set\fR, for user (\fBusr\fR) and system (\fBsys\fR) operations. .sp .in +2 .nf example% \fBmpstat -ap 5 2\fR SET minf mjf xcal intr ithr csw icsw migr smtx srw syscl usr sys wt idl sze 0 6 0 355 291 190 22 0 0 0 0 43 0 2 0 43 1 1 24 17 534 207 200 70 1 0 2 0 600 4 1 0 84 2 2 19 7 353 325 318 44 0 0 5 0 345 1 1 0 94 3 3 36 2 149 237 236 14 0 0 4 0 97 0 0 0 98 2 SET minf mjf xcal intr ithr csw icsw migr smtx srw syscl usr sys wt idl sze 0 1 0 720 405 304 55 0 0 18 0 12 0 15 0 81 1 1 0 69 1955 230 200 313 33 4 41 9 7086 34 10 0 19 2 2 0 46 685 314 300 203 11 0 54 1 5287 36 6 0 28 3 3 0 0 14 386 384 0 0 0 0 0 0 0 0 0 100 2 .fi .in -2 .sp .SH ATTRIBUTES .sp .LP See \fBattributes\fR(5) for descriptions of the following attributes: .sp .sp .TS tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) . ATTRIBUTE TYPEATTRIBUTE VALUE _ Interface StabilitySee below. .TE .sp .LP Invocation is evolving. Human readable output is unstable. .SH SEE ALSO .sp .LP \fBsar\fR(1), \fBdate\fR(1), \fBiostat\fR(1M), \fBsar\fR(1M), \fBvmstat\fR(1M), \fBtime\fR(2), \fBattributes\fR(5) .SH NOTES .sp .LP The sum of \fBCPU\fR utilization might vary slightly from 100 due to rounding errors in the production of a percentage figure. .sp .LP The total time used for \fBCPU\fR processing is the sum of \fBusr\fR and \fBsys\fR output values, reported for user and system operations. The \fBidl\fR value reports the time that the \fBCPU\fR is idle for any reason other than pending disk I/O operations. .sp .LP Run the \fBiostat\fR command with the \fB-x\fR option to report I/O service times in \fBsvc_t\fR output. The \fBiostat\fR utility also reports the same \fBwt\fR, user (\fBus\fR), and system (\fBsy\fR) statistics. See \fBiostat\fR(1M) for more information. .sp .LP When executing in a \fBzone\fR and if the pools facility is active, \fBmpstat\fR(1M) will only provide information for those processors which are a member of the processor set of the pool to which the \fBzone\fR is bound.