2 .\" Copyright (c) 1997 Kenneth D. Merry.
3 .\" All rights reserved.
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
8 .\" 1. Redistributions of source code must retain the above copyright
9 .\" notice, this list of conditions and the following disclaimer.
10 .\" 2. Redistributions in binary form must reproduce the above copyright
11 .\" notice, this list of conditions and the following disclaimer in the
12 .\" documentation and/or other materials provided with the distribution.
13 .\" 3. The name of the author may not be used to endorse or promote products
14 .\" derived from this software without specific prior written permission.
16 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
17 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
20 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 .\" Copyright (c) 1985, 1991, 1993
31 .\" The Regents of the University of California. All rights reserved.
33 .\" Redistribution and use in source and binary forms, with or without
34 .\" modification, are permitted provided that the following conditions
36 .\" 1. Redistributions of source code must retain the above copyright
37 .\" notice, this list of conditions and the following disclaimer.
38 .\" 2. Redistributions in binary form must reproduce the above copyright
39 .\" notice, this list of conditions and the following disclaimer in the
40 .\" documentation and/or other materials provided with the distribution.
41 .\" 3. Neither the name of the University nor the names of its contributors
42 .\" may be used to endorse or promote products derived from this software
43 .\" without specific prior written permission.
45 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
46 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
47 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
48 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
49 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
50 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
51 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
52 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
53 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
54 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
57 .\" @(#)iostat.8 8.1 (Berkeley) 6/6/93
85 utility displays kernel
87 statistics on terminal, device and cpu operations.
88 The first statistics that are printed are averaged over the system uptime.
89 To get information about the current activity, a suitable wait time should
90 be specified, so that the subsequent sets of printed statistics will be
91 averaged over that time.
93 The options are as follows:
101 is specified, the default depends on whether
106 the default repeat count is infinity, otherwise it is 1.
108 Display CPU statistics.
109 This is on by default, unless
115 Display only device statistics.
116 If this flag is turned on, only device statistics will be displayed, unless
120 is also specified to enable the display of CPU or TTY statistics.
129 will show devices in order from highest to lowest bytes
130 per measurement cycle.
132 Display total statistics for a given time period, rather than average
133 statistics for each second during that time period.
135 In the blocks transferred display (-o), display block count in kilobytes rather
136 then the device native block size.
138 Extract values associated with the name list from the specified core
139 instead of the default
147 utility will display fewer devices if there are not
151 Extract the name list from the specified system instead of the default
152 .Dq Pa /boot/kernel/kernel .
157 Sectors per second, transfers per second, and milliseconds per seek are
161 is specified, total blocks/sectors, total transfers, and
162 milliseconds per seek are displayed.
164 Specify which types of devices to display.
165 There are three different categories of devices:
167 .Bl -tag -width indent -compact
169 .Bl -tag -width 9n -compact
171 Direct Access devices
173 Sequential Access devices
179 Write Once Read Multiple devices
185 Optical Memory devices
187 Medium Changer devices
189 Communication devices
191 Storage Array devices
193 Enclosure Services devices
199 .Bl -tag -width 9n -compact
201 Integrated Drive Electronics devices
203 Small Computer System Interface devices
205 Any other device interface
209 .Bl -tag -width 9n -compact
215 The user must specify at least one device type, and may specify at most
216 one device type from each category.
217 Multiple device types in a single device type statement must be separated by
222 arguments may be specified on the command line.
225 arguments are ORed together to form a matching expression against which
226 all devices in the system are compared.
227 Any device that fully matches any
229 argument will be included in the
231 output, up to the number of devices that can be displayed in
232 80 columns, or the maximum number of devices specified by the user.
234 Display TTY statistics.
235 This is on by default, unless
243 seconds between each display.
246 interval is specified, the default is 1 second.
250 command will accept and honor a non-integer number of seconds.
251 Note that the interval only has millisecond granularity.
252 Finer values will be truncated.
257 The interval will also suffer from modifications to
259 so your mileage may vary.
261 Show extended disk statistics.
262 Each disk is displayed on a line of its own with all available statistics.
263 If this flag is turned on, only disk statistics will be displayed, unless
267 is also specified to enable the display of CPU or TTY statistics.
271 is specified, omit lines for devices with no activity.
273 Display a usage statement and exit.
278 utility displays its information in the following format:
281 .Bl -tag -width indent -compact
283 characters read from terminals
285 characters written to terminals
289 The header of the field is the device name and unit number.
293 will display as many devices as will fit in a standard 80 column screen, or
294 the maximum number of devices in the system, whichever is smaller.
297 is specified on the command line,
299 will display the smaller of the
300 requested number of devices, and the maximum number of devices in the system.
303 to display specific drives, their names may be supplied on the command
308 will not display more devices than will fit in an 80 column screen, unless
311 argument is given on the command line to specify a maximum number of
313 If fewer devices are specified on the command line than will fit in an 80
316 will show only the specified devices.
320 device display shows the following statistics:
322 .Bl -tag -width indent -compact
324 kilobytes per transfer
333 device display, with the
335 flag specified, shows the following statistics:
337 .Bl -tag -width indent -compact
339 kilobytes per transfer
341 total number of transfers
343 total number of megabytes transferred
348 device display, with the
350 flag specified, shows the following statistics:
352 .Bl -tag -width indent -compact
354 read operations per second
356 write operations per second
358 kilobytes read per second
360 kilobytes write per second
362 transactions queue length
364 average duration of transactions, in milliseconds
366 % of time the device had one or more outstanding transactions
371 device display, with the
375 flags specified, shows the following statistics:
377 .Bl -tag -width indent -compact
379 read operations per time period
381 write operations per time period
383 kilobytes read per time period
385 kilobytes write per time period
387 transactions queue length
389 total duration of transactions per time period, in seconds
391 total time the device had one or more outstanding transactions per
392 time period, in seconds
399 shows the following statistics:
401 .Bl -tag -width indent -compact
403 sectors transferred per second
407 average milliseconds per transaction
414 flag specified, shows the following statistics:
416 .Bl -tag -width indent -compact
418 total blocks/sectors transferred
422 average milliseconds per transaction
425 .Bl -tag -width indent -compact
427 % of cpu time in user mode
429 % of cpu time in user mode running niced processes
431 % of cpu time in system mode
433 % of cpu time in interrupt mode
435 % of cpu time in idle mode
439 .Bl -tag -width /boot/kernel/kernel -compact
440 .It Pa /boot/kernel/kernel
441 Default kernel namelist.
446 .Dl iostat -w 1 da0 da1 cd0
448 Display statistics for the first two Direct Access devices and the first
449 CDROM device every second ad infinitum.
453 Display the statistics for the first four devices in the system twice, with
454 a one second display interval.
456 .Dl iostat -t da -t cd -w 1
458 Display statistics for all CDROM and Direct Access devices every second
461 .Dl iostat -t da,scsi,pass -t cd,scsi,pass
463 Display statistics once for all SCSI passthrough devices that provide access
464 to either Direct Access or CDROM devices.
466 .Dl iostat -h -n 8 -w 1
468 Display up to 8 devices with the most I/O every second ad infinitum.
470 .Dl iostat -dh -t da -w 1
472 Omit the TTY and CPU displays, show devices in order of performance and
473 show only Direct Access devices every second ad infinitum.
477 Display total statistics every three seconds ad infinitum.
479 .Dl iostat -odICTw 2 -c 9
481 Display total statistics using the old-style output format 9 times, with
482 a two second interval between each measurement/display.
485 flag generally disables the TTY and CPU displays, but since the
489 flags are given, the TTY and CPU displays will be displayed.
502 The sections starting with ``Interpreting system activity'' in
503 .%T "Installing and Operating 4.3BSD" .
510 .An Kenneth Merry Aq Mt ken@FreeBSD.org
514 as a debugging tool for crash dumps is probably limited because there is
515 currently no way to get statistics that only cover the time immediately before