1iostat(1M) System Administration Commands iostat(1M)
2
3
4
6 iostat - report I/O statistics
7
9 /usr/bin/iostat [-cCdDeEiImMnpPrstxXYz] [-l n] [-T u | d]
10 [disk]... [interval [count]]
11
12
14 The iostat utility iteratively reports terminal, disk, and tape I/O
15 activity, as well as CPU utilization. The first line of output is for
16 all time since boot; each subsequent line is for the prior interval
17 only.
18
19
20 To compute this information, the kernel maintains a number of counters.
21 For each disk, the kernel counts reads, writes, bytes read, and bytes
22 written. The kernel also takes hi-res time stamps at queue entry and
23 exit points, which allows it to keep track of the residence time and
24 cumulative residence-length product for each queue. Using these values,
25 iostat produces highly accurate measures of throughput, utilization,
26 queue lengths, transaction rates and service time. For terminals col‐
27 lectively, the kernel simply counts the number of input and output
28 characters.
29
30
31 During execution of the kernel status command, the state of the system
32 can change. If relevant, a state change message is included in the
33 iostat output, in one of the following forms:
34
35 <<device added: sd0>>
36 <<device removed: sd0>>
37 <<partition added: sd0,a>>
38 <<partition removed: sd0,a>>
39 <<NFS mounted: nfs1>>
40 <<NFS unmounted: nfs1>>
41 <<multi-path added: ssd4>>
42 <<multi-path removed: ssd4>>
43 <<controller added: c1>>
44 <<controller removed: c1>>
45 <<processors added: 1, 3>>
46 <<processors removed: 1, 3>>
47
48
49
50
51 Note that the names printed in these state change messages are affected
52 by the -n and -m options as appropriate.
53
54
55 For more general system statistics, use sar(1), sar(1M), or vmstat(1M).
56
57 Output
58 The output of the iostat utility includes the following information.
59
60 device name of the disk
61
62
63 r/s reads per second
64
65
66 w/s writes per second
67
68
69 kr/s kilobytes read per second
70
71 The average I/O size during the interval can be computed from
72 kr/s divided by r/s.
73
74
75 kw/s kilobytes written per second
76
77 The average I/O size during the interval can be computed from
78 kw/s divided by w/s.
79
80
81 wait average number of transactions waiting for service (queue
82 length)
83
84 This is the number of I/O operations held in the device
85 driver queue waiting for acceptance by the device.
86
87
88 actv average number of transactions actively being serviced
89 (removed from the queue but not yet completed)
90
91 This is the number of I/O operations accepted, but not yet
92 serviced, by the device.
93
94
95 svc_t average response time of transactions, in milliseconds
96
97 The svc_t output reports the overall response time, rather
98 than the service time, of a device. The overall time includes
99 the time that transactions are in queue and the time that
100 transactions are being serviced. The time spent in queue is
101 shown with the -x option in the wsvc_t output column. The
102 time spent servicing transactions is the true service time.
103 Service time is also shown with the -x option and appears in
104 the asvc_t output column of the same report.
105
106
107 %w percent of time there are transactions waiting for service
108 (queue non-empty)
109
110
111 %b percent of time the disk is busy (transactions in progress)
112
113
114 wsvc_t average service time in wait queue, in milliseconds
115
116
117 asvc_t average service time of active transactions, in milliseconds
118
119
120 wt the I/O wait time is no longer calculated as a percentage of
121 CPU time, and this statistic will always return zero.
122
123
125 The following options are supported:
126
127 -c Report the percentage of time the system has spent in user
128 mode, in system mode, waiting for I/O, and idling. See the
129 NOTES section for more information.
130
131
132 -C When the -x option is also selected, report extended disk
133 statistics aggregated by controller id.
134
135
136 -d For each disk, report the number of kilobytes transferred
137 per second, the number of transfers per second, and the
138 average service time in milliseconds.
139
140
141 -D For each disk, report the reads per second, writes per sec‐
142 ond, and percentage disk utilization.
143
144
145 -e Display device error summary statistics. The total errors,
146 hard errors, soft errors, and transport errors are dis‐
147 played.
148
149
150 -E Display all device error statistics.
151
152
153 -i In -E output, display the Device ID instead of the Serial
154 No. The Device Id is a unique identifier registered by a
155 driver through ddi_devid_register(9F).
156
157
158 -I Report the counts in each interval, rather than rates
159 (where applicable).
160
161
162 -l n Limit the number of disks included in the report to n; the
163 disk limit defaults to 4 for -d and -D, and unlimited for
164 -x. Note: disks explicitly requested (see disk below) are
165 not subject to this disk limit.
166
167
168 -m Report file system mount points. This option is most useful
169 if the -P or -p option is also specified or used in con‐
170 junction with -Xn or -en. The -m option is useful only if
171 the mount point is actually listed in the output. This
172 option can only be used in conjunction with the -n option.
173
174
175 -M Display data throughput in MB/sec instead of KB/sec.
176
177
178 -n Display names in descriptive format. For example, cXtYdZ,
179 rmt/N, server:/export/path.
180
181 By default, disks are identified by instance names such as
182 ssd23 or md301. Combining the -n option with the -x option
183 causes disk names to display in the cXtYdZsN format which
184 is more easily associated with physical hardware character‐
185 istics. The cXtYdZsN format is particularly useful in
186 FibreChannel (FC) environments where the FC World Wide Name
187 appears in the t field.
188
189
190 -p For each disk, report per-partition statistics in addition
191 to per-device statistics.
192
193
194 -P For each disk, report per-partition statistics only, no
195 per-device statistics.
196
197
198 -r Display data in a comma-separated format.
199
200
201 -s Suppress messages related to state changes.
202
203
204 -t Report the number of characters read and written to termi‐
205 nals per second.
206
207
208 -T u | d Display a time stamp.
209
210 Specify u for a printed representation of the internal rep‐
211 resentation of time. See time(2). Specify d for standard
212 date format. See date(1).
213
214
215 -X For disks under scsi_vhci(7D) control, in addition to disk
216 lun statistics, also report statistics for lun.controller.
217
218
219 -x Report extended disk statistics. By default, disks are
220 identified by instance names such as ssd23 or md301. Com‐
221 bining the x option with the -n option causes disk names to
222 display in the cXtYdZsN format, more easily associated with
223 physical hardware characteristics. Using the cXtYdZsN for‐
224 mat is particularly helpful in the FibreChannel environ‐
225 ments where the FC World Wide Name appears in the t field.
226
227 If no output display is requested (no -x, -e, -E), -x is
228 implied.
229
230
231 -Y For disks under scsi_vhci(7D) control, in addition to disk
232 lun statistics, also report statistics for lun.targetport
233 and lun.targetport.controller.
234
235 In -n (descriptive) mode the targetport is shown in using
236 the target-port property of the path. Without -n the tar‐
237 getport is shown using the shorter port-id. All target
238 ports with the same target-port property value share the
239 same port-id. The target-port-to-port-id association does
240 not persist across reboot.
241
242 If no output display is requested (no -x, -e, -E), -x is
243 implied.
244
245
246 -z Do not print lines whose underlying data values are all
247 zeros.
248
249
250
251 The option set -xcnCXTdz interval is particularly useful for determin‐
252 ing whether disk I/O problems exist and for identifying problems.
253
255 The following operands are supported:
256
257 count Display only count reports.
258
259
260 disk Explicitly specify the disks to be reported; in addition to
261 any explicit disks, any active disks up to the disk limit
262 (see -l above) will also be reported.
263
264
265 interval Report once each interval seconds.
266
267
269 Example 1 Using iostat to Generate User and System Operation Statistics
270
271
272 The following command displays two reports of extended device statis‐
273 tics, aggregated by controller id, for user (us) and system (sy) opera‐
274 tions. Because the -n option is used with the -x option, devices are
275 identified by controller names.
276
277
278 example% iostat -xcnCXTdz 5
279
280
281 Mon Nov 24 14:58:36 2003
282 cpu
283 us sy wt id
284 14 31 0 20
285 extended device statistics
286 r/s w/s kr/s kw wait actv wsvc_t asvc_t %w %b device
287 3.8 29.9 145.8 44.0 0.0 0.2 0.1 6.4 0 5 c0
288 666.3 814.8 12577.6 17591.1 91.3 82.3 61.6 55.6 0 2 c12
289 180.0 234.6 4401.1 5712.6 0.0 147.7 0.0 356.3 0 98 d10
290
291 Mon Nov 24 14:58:41 2003
292 cpu
293 us sy wt id
294 11 31 0 22
295 extended device statistics
296 r/s w/s kr/s kw wait actv wsvc_t asvc_t %w %b device
297 0.8 41.0 5.2 20.5 0.0 0.2 0.2 4.4 0 6 c0
298 565.3 581.7 8573.2 10458.9 0.0 26.6 0.0 23.2 0 3 c12
299 106.5 81.3 3393.2 1948.6 0.0 5.7 0.0 30.1 0 99 d10
300
301
302
303 Example 2 Using iostat to Generate TTY Statistics
304
305
306 The following command displays two reports on the activity of five
307 disks in different modes of operation. Because the -x option is used,
308 disks are identified by instance names.
309
310
311 example% iostat -x tc 5 2
312
313
314 extended device statistics tty cpu
315 device r/s w/s kr/s kw/s wait actv svc_t %w %b tin tout us sy wt id
316 sd0 0.4 0.3 10.4 8.0 0.0 0.0 36.9 0 1 0 10 0 0 0 99
317 sd1 0.0 0.0 0.3 0.4 0.0 0.0 35.0 0 0
318 sd6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0 0
319 nfs1 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0 0
320 nfs2 0.0 0.0 0.0 0.1 0.0 0.0 35.6 0 0
321 extended device statistics tty cpu
322 device r/s w/s kr/s kw/s wait actv svc_t %w %b tin tout us sy wt id
323 sd0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0 0 0 155 0 0 0 100
324 sd1 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0 0
325 sd6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0 0
326 nfs1 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0 0
327 nfs2 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0 0
328
329
330
331
332 Example 3 Using iostat to Generate Partition and Device Statistics
333
334
335 The following command generates partition and device statistics for
336 each disk. Because the -n option is used with the -x option, disks are
337 identified by controller names.
338
339
340 example% iostat -xnp
341
342 extended device statistics
343 r/s w/s kr/s kw/s wait actv wsvc_t asvc_t %w %b device
344 0.4 0.3 10.4 7.9 0.0 0.0 0.0 36.9 0 1 c0t0d0
345 0.3 0.3 9.0 7.3 0.0 0.0 0.0 37.2 0 1 c0t0d0s0
346 0.0 0.0 0.1 0.5 0.0 0.0 0.0 34.0 0 0 c0t0d0s1
347 0.0 0.0 0.0 0.1 0.0 0.0 0.6 35.0 0 0 fuji:/export/home/user3
348
349
350
351 Example 4 Show Translation from Instance Name to Descriptive Name
352
353
354 The following example illustrates the use of iostat to translate a spe‐
355 cific instance name to a descriptive name.
356
357
358 example% iostat -xn sd1
359 extended device statistics
360 r/s w/s kr/s kw/s wait actv wsvc_t asvc_t %w %b device
361 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0 0 c8t1d0
362
363
364
365 Example 5 Show Target Port and Controller Activity for a Specific Disk
366
367
368 In the following example, there are four controllers, all connected to
369 the same target port.
370
371
372 # iostat -Y ssd22
373 extended device statistics
374 device r/s w/s kr/s kw/s wait actv svc_t %w %b
375 ssd22 0.2 0.0 1.5 0.0 0.0 0.0 0.7 0 0
376 ssd22.t2 0.2 0.0 1.5 0.0 0.0 0.0 0.0 0 0
377 ssd22.t2.fp0 0.0 0.0 0.4 0.0 0.0 0.0 0.0 0 0
378 ssd22.t2.fp1 0.0 0.0 0.4 0.0 0.0 0.0 0.0 0 0
379 ssd22.t2.fp2 0.0 0.0 0.4 0.0 0.0 0.0 0.0 0 0
380 ssd22.t2.fp3 0.0 0.0 0.4 0.0 0.0 0.0 0.0 0 0
381
382
383
385 See attributes(5) for descriptions of the following attributes:
386
387
388
389
390 ┌─────────────────────────────┬─────────────────────────────┐
391 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
392 ├─────────────────────────────┼─────────────────────────────┤
393 │Availability │SUNWcsu │
394 ├─────────────────────────────┼─────────────────────────────┤
395 │Interface Stability │See below. │
396 └─────────────────────────────┴─────────────────────────────┘
397
398
399 Invocation is evolving. Human readable output is unstable.
400
402 date(1), sar(1), sar(1M), mpstat(1M), vmstat(1M), time(2),
403 attributes(5), scsi_vhci(7D)
404
406 The sum of CPU utilization might vary slightly from 100 because of
407 rounding errors in the production of a percentage figure.
408
409
410 The svc_t response time is not particularly significant when the I/0
411 (r/s+w/s) rates are under 0.5 per second. Harmless spikes are fairly
412 normal in such cases.
413
414
415 The mpstat utility reports the same wt, usr, and sys statistics. See
416 mpstat(1M) for more information.
417
418
419 When executed in a zone and if the pools facility is active, iostat(1M)
420 will only provide information for those processors in the processor set
421 of the pool to which the zone is bound.
422
423
424
425SunOS 5.11 23 Mar 2009 iostat(1M)