1.\" $NetBSD: iostat.8,v 1.21 2003/05/01 15:29:24 wiz Exp $ 2.\" 3.\" Copyright (c) 1985, 1991, 1993 4.\" The Regents of the University of California. All rights reserved. 5.\" 6.\" Redistribution and use in source and binary forms, with or without 7.\" modification, are permitted provided that the following conditions 8.\" are met: 9.\" 1. Redistributions of source code must retain the above copyright 10.\" notice, this list of conditions and the following disclaimer. 11.\" 2. Redistributions in binary form must reproduce the above copyright 12.\" notice, this list of conditions and the following disclaimer in the 13.\" documentation and/or other materials provided with the distribution. 14.\" 3. All advertising materials mentioning features or use of this software 15.\" must display the following acknowledgement: 16.\" This product includes software developed by the University of 17.\" California, Berkeley and its contributors. 18.\" 4. Neither the name of the University nor the names of its contributors 19.\" may be used to endorse or promote products derived from this software 20.\" without specific prior written permission. 21.\" 22.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 23.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 24.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 25.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 26.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 27.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 28.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 29.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 30.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 31.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 32.\" SUCH DAMAGE. 33.\" 34.\" from: @(#)iostat.8 8.1 (Berkeley) 6/6/93 35.\" 36.Dd March 1, 2003 37.Dt IOSTAT 8 38.Os 39.Sh NAME 40.Nm iostat 41.Nd report 42.Tn I/O 43statistics 44.Sh SYNOPSIS 45.Nm 46.Op Fl CdDITx 47.Op Fl c Ar count 48.Op Fl M Ar core 49.Op Fl N Ar system 50.Op Fl w Ar wait 51.Op Ar drives 52.Sh DESCRIPTION 53.Nm 54displays kernel 55.Tn I/O 56statistics on terminal, disk and CPU operations. 57By default, 58.Nm 59displays one line of statistics averaged over the machine's run time. 60The use of 61.Fl c 62presents successive lines averaged over the 63.Ar wait 64period. 65The 66.Fl I 67option causes 68.Nm 69to print raw, unaveraged values. 70.Pp 71Only the last disk option specified 72.Fl ( d , 73.Fl D , 74or 75.Fl x ) 76is used. 77.Pp 78The options are as follows: 79.Bl -tag -width XNXsystemX 80.It Fl c Ar count 81Repeat the display 82.Ar count 83times. 84Unless the 85.Fl I 86flag is in effect, the first display is for the time since a reboot and 87each subsequent report is for the time period since the last display. 88If no 89.Ar wait 90interval is specified, the default is 1 second. 91.It Fl C 92Show CPU statistics. 93This is enabled by default unless the 94.Fl d , 95.Fl D , 96.Fl T , 97or 98.Fl x 99flags are used. 100.It Fl d 101Show disk statistics. 102This is the default. 103Displays kilobytes per 104transfer, number of transfers, and megabytes transferred. 105Use of this flag disables display of CPU and tty statistics. 106.It Fl D 107Show alternative disk statistics. 108Displays kilobytes transferred, number of 109transfers, and time spent in transfers. 110Use of this flag disables the default display. 111.It Fl I 112Show the running total values, rather than an average. 113.It Fl M Ar core 114Extract values associated with the name list from the specified core 115instead of the default 116.Dq Pa /dev/mem . 117.It Fl N Ar system 118Extract the name list from the specified system instead of the default 119.Dq Pa /netbsd . 120.It Fl T 121Show tty statistics. 122This is enabled by default unless the 123.Fl C , 124.Fl d , 125or 126.Fl D 127flags are used. 128.It Fl w Ar wait 129Pause 130.Ar wait 131seconds between each display. 132If no repeat 133.Ar count 134is specified, the default is infinity. 135.It Fl x 136Show extended disk statistics. 137Each disk is displayed on a line of its own with all available 138statistics. 139This option overrides all other display options, and all 140disks are displayed unless specific disks 141are provided as arguments. 142Additionally, separate read and write statistics are displayed. 143.El 144.Pp 145.Nm 146displays its information in the following format: 147.Bl -tag -width flag 148.It tty 149.Bl -tag -width indent -compact 150.It tin 151characters read from terminals 152.It tout 153characters written to terminals 154.El 155.It disks 156Disk operations. 157The header of the field is the disk name and unit number. 158If more than four disk drives are configured in the system, 159.Nm 160displays only the first four drives. 161To force 162.Nm 163to display specific drives, their names may be supplied on the command 164line. 165.Pp 166.Bl -tag -width indent -compact 167.It KB/t 168Kilobytes transferred per disk transfer 169.It t/s 170transfers per second 171.It MB/s 172Megabytes transferred per second 173.Pp 174.El 175The alternative display format, (selected with 176.Fl D ) , 177presents the following values. 178.Bl -tag -width indent -compact 179.It KB 180Kilobytes transferred 181.It xfr 182Disk transfers 183.It time 184Seconds spent in disk activity 185.El 186.It cpu 187.Bl -tag -width indent -compact 188.It \&us 189% of CPU time in user mode 190.It \&ni 191% of CPU time in user mode running niced processes 192.It \&sy 193% of CPU time in system mode 194.It \&id 195% of CPU time in idle mode 196.El 197.El 198.Sh FILES 199.Bl -tag -width /dev/mem -compact 200.It Pa /netbsd 201Default kernel namelist. 202.It Pa /dev/mem 203Default memory file. 204.El 205.Sh SEE ALSO 206.Xr fstat 1 , 207.Xr netstat 1 , 208.Xr nfsstat 1 , 209.Xr \&ps 1 , 210.Xr systat 1 , 211.Xr vmstat 1 , 212.Xr pstat 8 213.Pp 214The sections starting with ``Interpreting system activity'' in 215.%T "Installing and Operating 4.3BSD" . 216.Sh HISTORY 217.Nm 218appeared in 219.At v6 . 220The 221.Fl x 222option was added in 223.Nx 1.4 . 224