1.\" $NetBSD: iostat.8,v 1.27 2018/07/29 21:17:43 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. Neither the name of the University nor the names of its contributors 15.\" may be used to endorse or promote products derived from this software 16.\" without specific prior written permission. 17.\" 18.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 19.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 22.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 24.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 25.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 26.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 27.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28.\" SUCH DAMAGE. 29.\" 30.\" from: @(#)iostat.8 8.1 (Berkeley) 6/6/93 31.\" 32.Dd July 29, 2018 33.Dt IOSTAT 8 34.Os 35.Sh NAME 36.Nm iostat 37.Nd report I/O statistics 38.Sh SYNOPSIS 39.Nm 40.Op Fl CdDITxy 41.Op Fl c Ar count 42.Op Fl w Ar wait 43.Op Ar drives 44.Sh DESCRIPTION 45.Nm 46displays kernel I/O statistics on terminal, disk and CPU operations. 47By default, 48.Nm 49displays one line of statistics averaged over the machine's run time. 50The use of 51.Fl c 52presents successive lines averaged over the 53.Ar wait 54period. 55The 56.Fl I 57option causes 58.Nm 59to print raw, unaveraged values. 60.Pp 61Only the last disk option specified 62.Fl ( d , 63.Fl D , 64or 65.Fl x ) 66is used. 67.Pp 68The options are as follows: 69.Bl -tag -width XNXsystemX 70.It Fl c Ar count 71Repeat the display 72.Ar count 73times. 74Unless the 75.Fl I 76flag is in effect, the first display is for the time since a reboot and 77each subsequent report is for the time period since the last display. 78If no 79.Ar wait 80interval is specified, the default is 1 second. 81.It Fl C 82Show CPU statistics. 83This is enabled by default unless the 84.Fl d , 85.Fl D , 86.Fl T , 87or 88.Fl x 89flags are used. 90.It Fl d 91Show disk statistics. 92This is the default. 93Displays kilobytes per 94transfer, number of transfers, and megabytes transferred. 95Use of this flag disables display of CPU and tty statistics. 96.It Fl D 97Show alternative disk statistics. 98Displays kilobytes transferred, number of 99transfers, and time spent in transfers. 100Use of this flag disables the default display. 101.It Fl I 102Show the running total values, rather than an average. 103.It Fl T 104Show tty statistics. 105This is enabled by default unless the 106.Fl C , 107.Fl d , 108or 109.Fl D 110flags are used. 111.It Fl w Ar wait 112Pause 113.Ar wait 114seconds between each display. 115If no repeat 116.Ar count 117is specified, the default is infinity. 118.It Fl x 119Show extended disk statistics. 120Each disk is displayed on a line of its own with all available 121statistics. 122This option overrides all other display options, and all 123disks are displayed unless specific disks 124are provided as arguments. 125Additionally, separate read and write statistics are displayed. 126.It Fl y 127Shows the extended statistics and additional queuing statistics. 128.El 129.Pp 130.Nm 131displays its information in the following format: 132.Bl -tag -width flag 133.It tty 134.Bl -tag -width indent -compact 135.It tin 136characters read from terminals 137.It tout 138characters written to terminals 139.El 140.It disks 141Disk operations. 142The header of the field is the disk name and unit number. 143If more drives are configured in the system that fit across the 144current display, 145.Nm 146displays only those drives that fit on the display. 147To force 148.Nm 149to display specific drives, they may be supplied on the command 150line, either as names or 151.Fn fnmatch 152patterns. 153.Pp 154.Bl -tag -width indent -compact 155.It KB/t 156Kilobytes transferred per disk transfer 157.It t/s 158transfers per second 159.It MB/s 160Megabytes transferred per second 161.El 162The alternative display format, (selected with 163.Fl D ) , 164presents the following values. 165.Bl -tag -width indent -compact 166.It KB 167Kilobytes transferred 168.It xfr 169Disk transfers 170.It time 171Seconds spent in disk activity 172.El 173With the 174.Fl y 175flag, the following queuing measurements are added 176.Bl -tag -width indent -compact 177.It wait 178Number of I/O requests queued up 179.It actv 180Number of currently active I/O requests 181.It wsvc_t 182Average waiting time of an I/O request in milliseconds 183.It asvc_t 184Average duration of an I/O request in milliseconds 185.It wtime 186Seconds spent in the waiting queue. 187Queuing data might not be available from all drivers 188and is then shown as zeros. 189.El 190.It cpu 191.Bl -tag -width indent -compact 192.It \&us 193% of CPU time in user mode 194.It \&ni 195% of CPU time in user mode running niced processes 196.It \&sy 197% of CPU time in system mode 198.It \&in 199% of CPU time in interrupt mode 200.It \&id 201% of CPU time in idle mode 202.El 203.El 204.Sh SEE ALSO 205.Xr fstat 1 , 206.Xr netstat 1 , 207.Xr nfsstat 1 , 208.Xr ps 1 , 209.Xr systat 1 , 210.Xr vmstat 1 , 211.Xr fnmatch 3 , 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 . 224Collection of queueing values and the 225.Fl y 226option were added in 227.Nx 8.0 . 228