1.\" The contents of this file are subject to the terms of the Common 2.\" Development and Distribution License (the "License"). You may not use 3.\" this file except in compliance with the License. You can obtain a copy 4.\" of the license at usr/src/OPENSOLARIS.LICENSE or 5.\" http://www.opensolaris.org/os/licensing. 6.\" 7.\" See the License for the specific language governing permissions and 8.\" limitations under the License. When distributing Covered Code, include 9.\" this CDDL HEADER in each file and include the License file at 10.\" usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below 11.\" this CDDL HEADER, with 12.\" 13.\" the fields enclosed by brackets "[]" replaced with your own identifying 14.\" information: Portions Copyright [yyyy] [name of copyright owner] 15.\" 16.\" Copyright (c) 2004, Sun Microsystems, Inc. All Rights Reserved 17.\" Copyright 2026 Oxide Computer Company 18.\" 19.Dd June 29, 2026 20.Dt MPSTAT 8 21.Os 22.Sh NAME 23.Nm mpstat 24.Nd report per-processor or per-processor-set statistics 25.Sh SYNOPSIS 26.Nm 27.Op Fl aq 28.Op Fl p | P Ar set 29.Op Fl T Cm u | d 30.Op Ar interval Oo Ar count Oc 31.Sh DESCRIPTION 32The 33.Nm 34command reports processor statistics in tabular form. 35Each row of the table represents the activity of one processor. 36The first table summarizes all activity since boot. 37Each subsequent table summarizes activity for the preceding interval. 38All values are rates listed as events per second unless otherwise noted. 39.Pp 40During execution of the kernel status command, the state of the kernel can 41change. 42If relevant, a state change message is included in the 43.Nm 44output, in one of the following forms: 45.Bd -literal -offset indent 46<<processor 3 moved from pset: -1 to: 1>> 47<<pset destroyed: 1>> 48<<pset created: 1>> 49<<processors added: 1, 3>> 50<<processors removed: 1, 3>> 51.Ed 52.Pp 53The 54.Nm 55command reports the following information: 56.Bl -tag -width Ds 57.It Sy CPU No or Sy SET 58Without the 59.Fl a 60option, 61.Nm 62reports 63.Sy CPU 64statistics for a processor ID. 65With the 66.Fl a 67option, 68.Nm 69reports 70.Sy SET 71statistics for a processor set ID. 72.It Sy minf 73minor faults 74.It Sy mjf 75major faults 76.It Sy xcal 77inter-processor cross-calls 78.It Sy intr 79interrupts 80.It Sy ithr 81interrupts as threads 82.Pq not counting clock interrupt 83.It Sy csw 84context switches 85.It Sy icsw 86involuntary context switches 87.It Sy migr 88thread migrations 89.Pq to another processor 90.It Sy smtx 91spins on mutexes 92.Pq lock not acquired on first try 93.It Sy srw 94spins on readers/writer locks 95.Pq lock not acquired on first try 96.It Sy syscl 97system calls 98.It Sy usr 99percent user time 100.It Sy sys 101percent system time 102.It Sy wt 103the I/O wait time is no longer calculated as a percentage of CPU 104time, and this statistic will always return zero. 105.It Sy idl 106percent idle time 107.It Sy sze 108number of processors in the requested processor set 109.It Sy set 110processor set membership of each CPU 111.El 112.Sh OPTIONS 113The following options are supported: 114.Bl -tag -width Ds 115.It Fl a 116Aggregate output by processor set. 117Sort the output by set. 118The default output is sorted by CPU number. 119.It Fl p 120Report processor set membership of each CPU. 121Sort the output by set. 122The default output is sorted by CPU number. 123.It Fl P Ar set 124Display only those processors in the specified 125.Ar set . 126.It Fl q 127Suppress messages related to state changes. 128.It Fl T Cm u | d 129Specify 130.Cm u 131for a printed representation of the internal representation of time. 132See 133.Xr time 2 . 134Specify 135.Cm d 136for standard date format. 137See 138.Xr date 1 . 139.It Ar interval 140Report once each 141.Ar interval 142seconds. 143.It Ar count 144Only print 145.Ar count 146reports. 147.El 148.Sh EXAMPLES 149.Sy Example 1 150Using 151.Nm 152to Generate User and System Operation Statistics 153.Pp 154The following command generates processor statistics over a five-second 155interval in two reports. 156The command shows the processor set membership of each CPU. 157The default output is sorted by CPU number, aggregated by 158.Em processor set , 159for user 160.Pq Sy usr 161and system 162.Pq Sy sys 163operations. 164.Bd -literal 165example% mpstat -ap 5 2 166 167SET minf mjf xcal intr ithr csw icsw migr smtx srw syscl usr sys wt idl sze 168 0 6 0 355 291 190 22 0 0 0 0 43 0 2 0 43 1 169 1 24 17 534 207 200 70 1 0 2 0 600 4 1 0 84 2 170 2 19 7 353 325 318 44 0 0 5 0 345 1 1 0 94 3 171 3 36 2 149 237 236 14 0 0 4 0 97 0 0 0 98 2 172SET minf mjf xcal intr ithr csw icsw migr smtx srw syscl usr sys wt idl sze 173 0 1 0 720 405 304 55 0 0 18 0 12 0 15 0 81 1 174 1 0 69 1955 230 200 313 33 4 41 9 7086 34 10 0 19 2 175 2 0 46 685 314 300 203 11 0 54 1 5287 36 6 0 28 3 176 3 0 0 14 386 384 0 0 0 0 0 0 0 0 0 100 2 177.Ed 178.Sh INTERFACE STABILITY 179The command line interface of 180.Nm 181is 182.Sy Evolving . 183The output of 184.Nm 185is 186.Sy Not-An-Interface 187and may change at any time. 188.Sh SEE ALSO 189.Xr date 1 , 190.Xr sar 1 , 191.Xr time 2 , 192.Xr attributes 7 , 193.Xr iostat 8 , 194.Xr sar 8 , 195.Xr vmstat 8 196.Sh NOTES 197The sum of CPU utilization might vary slightly from 100 due to rounding errors 198in the production of a percentage figure. 199.Pp 200The total time used for CPU 201processing is the sum of 202.Sy usr 203and 204.Sy sys 205output values, reported for user and system operations. 206The 207.Sy idl 208value reports the time that the CPU 209is idle for any reason other than pending disk I/O operations. 210.Pp 211Run the 212.Xr iostat 8 213command with the 214.Fl x 215option to report I/O service times in 216.Sy svc_t 217output. 218The 219.Xr iostat 8 220utility also reports the same 221.Sy wt , 222user 223.Pq Sy us , 224and system 225.Pq Sy sy 226statistics. 227See 228.Xr iostat 8 229for more information. 230.Pp 231When executing in a zone 232and if the pools facility is active, 233.Nm 234will only provide information for those processors which are a member of the 235processor set of the pool to which the zone 236is bound. 237