xref: /netbsd-src/usr.sbin/iostat/iostat.8 (revision d909946ca08dceb44d7d0f22ec9488679695d976)
1.\"	$NetBSD: iostat.8,v 1.24 2015/07/09 13:26:52 mrg 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 CdDITx
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.El
131.Pp
132.Nm
133displays its information in the following format:
134.Bl -tag -width flag
135.It tty
136.Bl -tag -width indent -compact
137.It tin
138characters read from terminals
139.It tout
140characters written to terminals
141.El
142.It disks
143Disk operations.
144The header of the field is the disk name and unit number.
145If more drives are configured in the system that fit across the
146current display,
147.Nm
148displays only those drives that fit on the display.
149To force
150.Nm
151to display specific drives, they may be supplied on the command
152line, either as names or
153.Fn fnmatch
154patterns.
155.Pp
156.Bl -tag -width indent -compact
157.It KB/t
158Kilobytes transferred per disk transfer
159.It t/s
160transfers per second
161.It MB/s
162Megabytes transferred per second
163.Pp
164.El
165The alternative display format, (selected with
166.Fl D ) ,
167presents the following values.
168.Bl -tag -width indent -compact
169.It KB
170Kilobytes transferred
171.It xfr
172Disk transfers
173.It time
174Seconds spent in disk activity
175.El
176.It cpu
177.Bl -tag -width indent -compact
178.It \&us
179% of CPU time in user mode
180.It \&ni
181% of CPU time in user mode running niced processes
182.It \&sy
183% of CPU time in system mode
184.It \&id
185% of CPU time in idle mode
186.El
187.El
188.Sh SEE ALSO
189.Xr fstat 1 ,
190.Xr netstat 1 ,
191.Xr nfsstat 1 ,
192.Xr \&ps 1 ,
193.Xr systat 1 ,
194.Xr vmstat 1 ,
195.Xr fnmatch 3 ,
196.Xr pstat 8
197.Pp
198The sections starting with ``Interpreting system activity'' in
199.%T "Installing and Operating 4.3BSD" .
200.Sh HISTORY
201.Nm
202appeared in
203.At v6 .
204The
205.Fl x
206option was added in
207.Nx 1.4 .
208