diff options
Diffstat (limited to 'usr.sbin/iostat/iostat.8')
-rw-r--r-- | usr.sbin/iostat/iostat.8 | 281 |
1 files changed, 267 insertions, 14 deletions
diff --git a/usr.sbin/iostat/iostat.8 b/usr.sbin/iostat/iostat.8 index 861acef..3df37cf 100644 --- a/usr.sbin/iostat/iostat.8 +++ b/usr.sbin/iostat/iostat.8 @@ -1,3 +1,32 @@ +.\" +.\" Copyright (c) 1997 Kenneth D. Merry. +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 3. The name of the author may not be used to endorse or promote products +.\" derived from this software without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $Id$ +.\" .\" Copyright (c) 1985, 1991, 1993 .\" The Regents of the University of California. All rights reserved. .\" @@ -31,9 +60,9 @@ .\" .\" @(#)iostat.8 8.1 (Berkeley) 6/6/93 .\" -.Dd June 6, 1993 +.Dd December 22, 1997 .Dt IOSTAT 8 -.Os BSD 4 +.Os FreeBSD 3.0 .Sh NAME .Nm iostat .Nd report @@ -41,16 +70,19 @@ statistics .Sh SYNOPSIS .Nm iostat +.Op Fl CdhIoT? .Op Fl c Ar count .Op Fl M Ar core +.Op Fl n Ar devs .Op Fl N Ar system +.Op Fl t Ar type,if,pass .Op Fl w Ar wait .Op Ar drives .Sh DESCRIPTION .Nm Iostat displays kernel .Tn I/O -statistics on terminal, disk and cpu +statistics on terminal, device and cpu operations. .Pp The options are as follows: @@ -58,19 +90,123 @@ The options are as follows: .It Fl c Repeat the display .Ar count -times. -The first display is for the time since a reboot and each subsequent -report is for the time period since the last display. -If no +times. If no .Ar wait interval is specified, the default is 1 second. +.It Fl C +Display CPU statistics. This is on by default, unless +.Fl d +is specified. +.It Fl d +Display only device statistics. If this flag is turned on, only device +statistics will be displayed, unless +.Fl C +or +.Fl T +is also specfied to enable the display of CPU or TTY statistics. +.It Fl h +Put iostat in +.Sq top +mode. In this mode, iostat will show devices in order from highest to +lowest bytes per measurement cycle. +.It Fl I +Display total statstics for a given time period, rather than average +statistics for each second during that time period. .It Fl M Extract values associated with the name list from the specified core instead of the default .Dq Pa /dev/kmem . +.It Fl n +Display up to +.Ar devs +number of devices. +.Nm iostat +will display fewer devices if there aren't +.Ar devs +devices present. .It Fl N Extract the name list from the specified system instead of the default .Dq Pa /kernel . +.It Fl o +Display old-style +.Nm iostat +device statistics. Sectors per second, transfers per second, and miliseconds +per seek are displayed. If +.Fl I +is specified, total blocks/sectors, total transfers, and +miliseconds per seek are displayed. +.It Fl t +Specify which types of devices to display. There are three different +categories of devices: + +.Bl -tag -width indent -compact +.It device type: +.Bl -tag -width 123456789 -compact +.It da +Direct Access devices +.It sa +Sequential Access devices +.It printer +Printers +.It proc +Processor devices +.It worm +Write Once Read Multiple devices +.It cd +CD devices +.It scanner +Scanner devices +.It optical +Optical Memory devices +.It changer +Medium Changer devices +.It comm +Communication devices +.It array +Storage Array devices +.It enclosure +Enclosure Services devices +.It floppy +Floppy devices +.El +.Pp +.It interface: +.Bl -tag -width 123456789 -compact +.It IDE +Integrated Drive Electronics devices +.It SCSI +Small Computer System Interface devices +.It other +Any other device interface +.El +.Pp +.It passthrough: +.Bl -tag -width 123456789 -compact +.It pass +Passthrough devices +.El +.El +.Pp +The user must specify at least one device type, and may specify at most +one device type from each category. Multiple device types in a single +device type statement must be separated by commas. +.Pp +Any number of +.Fl t +arguments may be specified on the command line. All +.Fl t +arguments are ORed together to form a matching expression against which +all devices in the system are compared. Any device that fully matches +any +.Fl t +argument will be included in the +.Nm iostat +output, up to the number of devices that can be displayed in +80 columns, or the maximum number of devices specified by the user. +.It Fl T +Display TTY statistics. This is on by default, unless +.Fl d +is specified. .It Fl w Pause .Ar wait @@ -78,6 +214,8 @@ seconds between each display. If no repeat .Ar count is specified, the default is infinity. +.It Fl ? +Display a usage statement and exit. .El .Pp .Nm Iostat @@ -90,16 +228,60 @@ characters read from terminals .It tout characters written to terminals .El -.It disks -Disk operations (this field is system dependent). -The header of the field is the disk name and unit number. -If more than four disk drives are configured in the system, +.It devices +Device operations. The header of the field is the device name and unit number. .Nm iostat -displays only the first four drives. +will display as many devices as will fit in a standard 80 column screen, or +the maximum number of devices in the system, whichever is smaller. If +.Fl n +is specified on the command line, iostat will display the smaller of the +requested number of devices, and the maximum number of devices in the system. To force .Nm iostat to display specific drives, their names may be supplied on the command line. +.Nm iostat +will not display more devices than will fit in an 80 column screen, unless +the +.Fl n +argument is given on the command line to specify a maximum number of +devices to display. If fewer devices are specified on the command line +than will fit in an 80 column screen, iostat will show only the specified +devices. +.Pp +The standard +.Nm iostat +device display shows the following statistics: +.Pp +.Bl -tag -width indent -compact +.It KB/t +kilobytes per transfer +.It tps +transfers per second +.It MB/s +megabytes per second +.El +.Pp +The standard +.Nm iostat +device display, with the +.Fl I +flag specified, shows the following statistics: +.Pp +.Bl -tag -width indent -compact +.It KB/t +kilobytes per transfer +.It xfrs +total number of transfers +.It MB +total number of megabytes transferred +.El +.Pp +The old-style +.Nm iostat +display (using +.Fl o ) +shows the following statistics: .Pp .Bl -tag -width indent -compact .It sps @@ -107,8 +289,22 @@ sectors transferred per second .It tps transfers per second .It msps -milliseconds per average seek (including implied -seeks and rotational latency) +average milliseconds per transaction +.El +.Pp +The old-style +.Nm iostat +display, with the +.Fl I +flag specified, shows the following statistics: +.Pp +.Bl -tag -width indent -compact +.It blk +total blocks/sectors transferred +.It xfr +total transfers +.It msps +average milliseconds per transaction .El .It cpu .Bl -tag -width indent -compact @@ -131,6 +327,50 @@ Default kernel namelist. .It Pa /dev/kmem Default memory file. .El +.Sh EXAMPLES +.Dl iostat -w 1 da0 da1 cd0 +.Pp +Display statistics for the first two Direct Access devices and the first +CDROM device every second ad infinitum. +.Pp +.Dl iostat -c 2 +.Pp +Display the statistics for the first four devices in the system twice, with +a one second display interval. +.Pp +.Dl iostat -t da -t cd -w 1 +.Pp +Display statistics for all CDROM and Direct Access devices every second +ad infinitum. +.Pp +.Dl iostat -t da,scsi,pass -t cd,scsi,pass +.Pp +Display statistics once for all SCSI passthrough devices that provide access +to either Direct Access or CDROM devices. +.Pp +.Dl iostat -h -n 8 -w 1 +.Pp +Display up to 8 devices with the most I/O every second ad inifitum. +.Pp +.Dl iostat -dh -t da -w 1 +.Pp +Omit the TTY and CPU displays, show devices in order of performance and +show only Direct Access devices every second ad infinitum. +.Pp +.Dl iostat -Iw 3 +.Pp +Display total statistics every three seconds ad infinitum. +.Pp +.Dl iostat -odICTw 2 -c 9 +.Pp +Display total statistics using the old-style output format 9 times, with +a two second interval between each measurement/display. The +.Fl d +flag generally disables the TTY and CPU displays, but since the +.Fl T +and +.Fl C +flags are given, the TTY and CPU displays will be displayed. .Sh SEE ALSO .Xr fstat 1 , .Xr netstat 1 , @@ -142,3 +382,16 @@ Default memory file. .Pp The sections starting with ``Interpreting system activity'' in .%T "Installing and Operating 4.3BSD" . +.Sh HISTORY +This version of +.Nm iostat +first appeared in +.Fx 3.0 . +.Sh BUGS +.Pp +You cannot display device statistics for a non-running system, due to the +fact that the new device statistics interface is accessible only via +.Xr sysctl 3 , +which does not provide a way to access non-running systems. +.Sh AUTHOR +.An Kenneth Merry Aq ken@FreeBSD.ORG |