1mpstat(1M) System Administration Commands mpstat(1M)
2
3
4
6 mpstat - report per-processor or per-processor-set statistics
7
9 /usr/bin/mpstat [-aq] [-p | -P set] [-T u | d] [interval [count]]
10
11
13 The mpstat command reports processor statistics in tabular form. Each
14 row of the table represents the activity of one processor. The first
15 table summarizes all activity since boot. Each subsequent table summa‐
16 rizes activity for the preceding interval. All values are rates listed
17 as events per second unless otherwise noted.
18
19
20 During execution of the kernel status command, the state of the kernel
21 can change. If relevant, a state change message is included in the
22 mpstat output, in one of the following forms:
23
24 <<processor 3 moved from pset: -1 to: 1>>
25 <<pset destroyed: 1>>
26 <<pset created: 1>>
27 <<processors added: 1, 3>>
28 <<processors removed: 1, 3>>
29
30
31
32
33 The mpstat command reports the following information:
34
35 CPU or SET Without the -a option, mpstat reports CPU statistics for
36 a processor ID. With the -a option, mpstat reports SET
37 statistics for a processor set ID.
38
39
40 minf minor faults
41
42
43 mjf major faults
44
45
46 xcal inter-processor cross-calls
47
48
49 intr interrupts
50
51
52 ithr interrupts as threads (not counting clock interrupt)
53
54
55 csw context switches
56
57
58 icsw involuntary context switches
59
60
61 migr thread migrations (to another processor)
62
63
64 smtx spins on mutexes (lock not acquired on first try)
65
66
67 srw spins on readers/writer locks (lock not acquired on first
68 try)
69
70
71 syscl system calls
72
73
74 usr percent user time
75
76
77 sys percent system time
78
79
80 wt the I/O wait time is no longer calculated as a percentage
81 of CPU time, and this statistic will always return zero.
82
83
84 idl percent idle time
85
86
87 sze number of processors in the requested processor set
88
89
90 set processor set membership of each CPU
91
92
94 The following options are supported:
95
96 -a Aggregate output by processor set. Sort the output by set.
97 The default output is sorted by CPU number.
98
99
100 -p Report processor set membership of each CPU. Sort the out‐
101 put by set. The default output is sorted by CPU number.
102
103
104 -P set Display only those processors in the specified set.
105
106
107 -q Suppress messages related to state changes.
108
109
110 -T u | d Specify u for a printed representation of the internal
111 representation of time. See time(2). Specify d for stan‐
112 dard date format. See date(1).
113
114
115 interval Report once each interval seconds.
116
117
118 count Only print count reports.
119
120
122 Example 1 Using mpstat to Generate User and System Operation Statistics
123
124
125 The following command generates processor statistics over a five-second
126 interval in two reports. The command shows the processor set membership
127 of each CPU. The default output is sorted by CPU number, aggregated by
128 processor set, for user (usr) and system (sys) operations.
129
130
131 example% mpstat -ap 5 2
132
133
134 SET minf mjf xcal intr ithr csw icsw migr smtx srw syscl usr sys wt idl sze
135 0 6 0 355 291 190 22 0 0 0 0 43 0 2 0 43 1
136 1 24 17 534 207 200 70 1 0 2 0 600 4 1 0 84 2
137 2 19 7 353 325 318 44 0 0 5 0 345 1 1 0 94 3
138 3 36 2 149 237 236 14 0 0 4 0 97 0 0 0 98 2
139 SET minf mjf xcal intr ithr csw icsw migr smtx srw syscl usr sys wt idl sze
140 0 1 0 720 405 304 55 0 0 18 0 12 0 15 0 81 1
141 1 0 69 1955 230 200 313 33 4 41 9 7086 34 10 0 19 2
142 2 0 46 685 314 300 203 11 0 54 1 5287 36 6 0 28 3
143 3 0 0 14 386 384 0 0 0 0 0 0 0 0 0 100 2
144
145
146
148 See attributes(5) for descriptions of the following attributes:
149
150
151
152
153 ┌─────────────────────────────┬─────────────────────────────┐
154 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
155 ├─────────────────────────────┼─────────────────────────────┤
156 │Availability │SUNWcsu │
157 ├─────────────────────────────┼─────────────────────────────┤
158 │Interface Stability │See below. │
159 └─────────────────────────────┴─────────────────────────────┘
160
161
162 Invocation is evolving. Human readable output is unstable.
163
165 sar(1), date(1), iostat(1M), sar(1M), vmstat(1M), time(2),
166 attributes(5)
167
169 The sum of CPU utilization might vary slightly from 100 due to rounding
170 errors in the production of a percentage figure.
171
172
173 The total time used for CPU processing is the sum of usr and sys output
174 values, reported for user and system operations. The idl value reports
175 the time that the CPU is idle for any reason other than pending disk
176 I/O operations.
177
178
179 Run the iostat command with the -x option to report I/O service times
180 in svc_t output. The iostat utility also reports the same wt, user
181 (us), and system (sy) statistics. See iostat(1M) for more information.
182
183
184 When executing in a zone and if the pools facility is active,
185 mpstat(1M) will only provide information for those processors which are
186 a member of the processor set of the pool to which the zone is bound.
187
188
189
190SunOS 5.11 23 Mar 2009 mpstat(1M)