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