xref: /netbsd/usr.sbin/iostat/iostat.8 (revision bf9ec67e)
1.\"	$NetBSD: iostat.8,v 1.16 2001/07/08 18:19:16 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 August 25, 1998
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.  By default,
57.Nm
58displays one line of statistics averaged over the machine's run time.
59The use of
60.Fl c
61presents successive lines averaged over the
62.Ar wait
63period.
64The
65.Fl I
66option causes
67.Nm
68to print raw, unaveraged values.
69.Pp
70Only the last disk option specified
71.Fl ( d ,
72.Fl D ,
73or
74.Fl x )
75is used.
76.Pp
77The options are as follows:
78.Bl -tag -width flag
79.It Fl c
80Repeat the display
81.Ar count
82times.
83Unless the
84.Fl I
85flag is in effect, the first display is for the time since a reboot and
86each subsequent report is for the time period since the last display.
87If no
88.Ar wait
89interval is specified, the default is 1 second.
90.It Fl C
91Show CPU statistics.  This is enabled by default unless the
92.Fl d ,
93.Fl D ,
94.Fl T ,
95or
96.Fl x
97flags are used.
98.It Fl d
99Show disk statistics.  This is the default.  Displays kilobytes per
100transfer, number of transfers, and megabytes transferred.  Use of this
101flag disables display of CPU and tty statistics.
102.It Fl D
103Show alternative disk statistics.  Displays kilobytes transferred, number of
104transfers, and time spent in transfers.  Use of this flag disables the
105default display.
106.It Fl I
107Show the running total values, rather than an average.
108.It Fl M
109Extract values associated with the name list from the specified core
110instead of the default
111.Dq Pa /dev/mem .
112.It Fl N
113Extract the name list from the specified system instead of the default
114.Dq Pa /netbsd .
115.It Fl T
116Show tty statistics.  This is enabled by default unless the
117.Fl C ,
118.Fl d ,
119or
120.Fl D
121flags are used.
122.It Fl w
123Pause
124.Ar wait
125seconds between each display.
126If no repeat
127.Ar count
128is specified, the default is infinity.
129.It Fl x
130Show extended disk statistics.
131Each disk is displayed on a line of its own with all available
132statistics.
133This option overrides all other display options, and all
134disks are displayed regardless of whether specific disks
135are provided as arguments.
136.El
137.Pp
138.Nm
139displays its information in the following format:
140.Bl -tag -width flag
141.It tty
142.Bl -tag -width indent -compact
143.It tin
144characters read from terminals
145.It tout
146characters written to terminals
147.El
148.It disks
149Disk operations.
150The header of the field is the disk name and unit number.
151If more than four disk drives are configured in the system,
152.Nm
153displays only the first four drives.
154To force
155.Nm
156to display specific drives, their names may be supplied on the command
157line.
158.Pp
159.Bl -tag -width indent -compact
160.It KB/t
161Kilobytes transferred per disk transfer
162.It t/s
163transfers per second
164.It MB/s
165Megabytes transferred per second
166.Pp
167.El
168The alternative display format, (selected with
169.Fl D ) ,
170presents the following values.
171.Bl -tag -width indent -compact
172.It KB
173Kilobytes transferred
174.It xfr
175Disk transfers
176.It time
177Seconds spent in disk activity
178.El
179.It cpu
180.Bl -tag -width indent -compact
181.It \&us
182% of CPU time in user mode
183.It \&ni
184% of CPU time in user mode running niced processes
185.It \&sy
186% of CPU time in system mode
187.It \&id
188% of CPU time in idle mode
189.El
190.El
191.Sh FILES
192.Bl -tag -width /dev/mem -compact
193.It Pa /netbsd
194Default kernel namelist.
195.It Pa /dev/mem
196Default memory file.
197.El
198.Sh SEE ALSO
199.Xr fstat 1 ,
200.Xr netstat 1 ,
201.Xr nfsstat 1 ,
202.Xr \&ps 1 ,
203.Xr systat 1 ,
204.Xr vmstat 1 ,
205.Xr pstat 8
206.Pp
207The sections starting with ``Interpreting system activity'' in
208.%T "Installing and Operating 4.3BSD" .
209.Sh HISTORY
210.Nm
211appeared in
212.At v6 .
213The
214.Fl x
215option was added in
216.Nx 1.4 .
217