xref: /netbsd-src/usr.sbin/iostat/iostat.8 (revision b7b7574d3bf8eeb51a1fa3977b59142ec6434a55)
1.\"	$NetBSD: iostat.8,v 1.23 2014/06/11 17:01:04 joerg 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 June 11, 2014
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 than four disk drives are configured in the system,
146.Nm
147displays only the first four drives.
148To force
149.Nm
150to display specific drives, their names may be supplied on the command
151line.
152.Pp
153.Bl -tag -width indent -compact
154.It KB/t
155Kilobytes transferred per disk transfer
156.It t/s
157transfers per second
158.It MB/s
159Megabytes transferred per second
160.Pp
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
173.It cpu
174.Bl -tag -width indent -compact
175.It \&us
176% of CPU time in user mode
177.It \&ni
178% of CPU time in user mode running niced processes
179.It \&sy
180% of CPU time in system mode
181.It \&id
182% of CPU time in idle mode
183.El
184.El
185.Sh SEE ALSO
186.Xr fstat 1 ,
187.Xr netstat 1 ,
188.Xr nfsstat 1 ,
189.Xr \&ps 1 ,
190.Xr systat 1 ,
191.Xr vmstat 1 ,
192.Xr pstat 8
193.Pp
194The sections starting with ``Interpreting system activity'' in
195.%T "Installing and Operating 4.3BSD" .
196.Sh HISTORY
197.Nm
198appeared in
199.At v6 .
200The
201.Fl x
202option was added in
203.Nx 1.4 .
204