xref: /netbsd-src/usr.sbin/iostat/iostat.8 (revision bdc22b2e01993381dcefeff2bc9b56ca75a4235c)
1.\"	$NetBSD: iostat.8,v 1.25 2017/03/05 23:07:12 mlelstv 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 9, 2015
33.Dt IOSTAT 8
34.Os
35.Sh NAME
36.Nm iostat
37.Nd report
38.Tn I/O
39statistics
40.Sh SYNOPSIS
41.Nm
42.Op Fl CdDITxy
43.Op Fl c Ar count
44.Op Fl w Ar wait
45.Op Ar drives
46.Sh DESCRIPTION
47.Nm
48displays kernel
49.Tn I/O
50statistics on terminal, disk and CPU operations.
51By default,
52.Nm
53displays one line of statistics averaged over the machine's run time.
54The use of
55.Fl c
56presents successive lines averaged over the
57.Ar wait
58period.
59The
60.Fl I
61option causes
62.Nm
63to print raw, unaveraged values.
64.Pp
65Only the last disk option specified
66.Fl ( d ,
67.Fl D ,
68or
69.Fl x )
70is used.
71.Pp
72The options are as follows:
73.Bl -tag -width XNXsystemX
74.It Fl c Ar count
75Repeat the display
76.Ar count
77times.
78Unless the
79.Fl I
80flag is in effect, the first display is for the time since a reboot and
81each subsequent report is for the time period since the last display.
82If no
83.Ar wait
84interval is specified, the default is 1 second.
85.It Fl C
86Show CPU statistics.
87This is enabled by default unless the
88.Fl d ,
89.Fl D ,
90.Fl T ,
91or
92.Fl x
93flags are used.
94.It Fl d
95Show disk statistics.
96This is the default.
97Displays kilobytes per
98transfer, number of transfers, and megabytes transferred.
99Use of this flag disables display of CPU and tty statistics.
100.It Fl D
101Show alternative disk statistics.
102Displays kilobytes transferred, number of
103transfers, and time spent in transfers.
104Use of this flag disables the default display.
105.It Fl I
106Show the running total values, rather than an average.
107.It Fl T
108Show tty statistics.
109This is enabled by default unless the
110.Fl C ,
111.Fl d ,
112or
113.Fl D
114flags are used.
115.It Fl w Ar wait
116Pause
117.Ar wait
118seconds between each display.
119If no repeat
120.Ar count
121is specified, the default is infinity.
122.It Fl x
123Show extended disk statistics.
124Each disk is displayed on a line of its own with all available
125statistics.
126This option overrides all other display options, and all
127disks are displayed unless specific disks
128are provided as arguments.
129Additionally, separate read and write statistics are displayed.
130.It Fl y
131Shows the extended statistics and additional queuing statistics.
132.El
133.Pp
134.Nm
135displays its information in the following format:
136.Bl -tag -width flag
137.It tty
138.Bl -tag -width indent -compact
139.It tin
140characters read from terminals
141.It tout
142characters written to terminals
143.El
144.It disks
145Disk operations.
146The header of the field is the disk name and unit number.
147If more drives are configured in the system that fit across the
148current display,
149.Nm
150displays only those drives that fit on the display.
151To force
152.Nm
153to display specific drives, they may be supplied on the command
154line, either as names or
155.Fn fnmatch
156patterns.
157.Pp
158.Bl -tag -width indent -compact
159.It KB/t
160Kilobytes transferred per disk transfer
161.It t/s
162transfers per second
163.It MB/s
164Megabytes transferred per second
165.Pp
166.El
167The alternative display format, (selected with
168.Fl D ) ,
169presents the following values.
170.Bl -tag -width indent -compact
171.It KB
172Kilobytes transferred
173.It xfr
174Disk transfers
175.It time
176Seconds spent in disk activity
177.Pp
178.El
179With the
180.Fl y
181flag, the following queuing measurements are added
182.Bl -tag -width indent -compact
183.It wait
184Number of I/O requests queued up
185.It actv
186Number of currently active I/O requests
187.It wsvc_t
188Average waiting time of an I/O request in milliseconds
189.It asvc_t
190Average duration of an I/O request in milliseconds
191.It wtime
192Seconds spent in the waiting queue.
193Queuing data might not be available from all drivers
194and is then shown as zeros.
195.El
196.It cpu
197.Bl -tag -width indent -compact
198.It \&us
199% of CPU time in user mode
200.It \&ni
201% of CPU time in user mode running niced processes
202.It \&sy
203% of CPU time in system mode
204.It \&id
205% of CPU time in idle mode
206.El
207.El
208.Sh SEE ALSO
209.Xr fstat 1 ,
210.Xr netstat 1 ,
211.Xr nfsstat 1 ,
212.Xr \&ps 1 ,
213.Xr systat 1 ,
214.Xr vmstat 1 ,
215.Xr fnmatch 3 ,
216.Xr pstat 8
217.Pp
218The sections starting with ``Interpreting system activity'' in
219.%T "Installing and Operating 4.3BSD" .
220.Sh HISTORY
221.Nm
222appeared in
223.At v6 .
224The
225.Fl x
226option was added in
227.Nx 1.4 .
228Collection of queueing values and the
229.Fl y
230option were added in
231.Nx 8.0 .
232