xref: /openbsd/usr.sbin/iostat/iostat.8 (revision 3bef86f7)
1.\"	$OpenBSD: iostat.8,v 1.28 2022/09/17 11:39:09 jmc Exp $
2.\"	$NetBSD: iostat.8,v 1.10 1996/10/25 18:21:57 scottr Exp $
3.\"
4.\" Copyright (c) 1985, 1991, 1993
5.\"	The Regents of the University of California.  All rights reserved.
6.\"
7.\" Redistribution and use in source and binary forms, with or without
8.\" modification, are permitted provided that the following conditions
9.\" are met:
10.\" 1. Redistributions of source code must retain the above copyright
11.\"    notice, this list of conditions and the following disclaimer.
12.\" 2. Redistributions in binary form must reproduce the above copyright
13.\"    notice, this list of conditions and the following disclaimer in the
14.\"    documentation and/or other materials provided with the distribution.
15.\" 3. Neither the name of the University nor the names of its contributors
16.\"    may be used to endorse or promote products derived from this software
17.\"    without specific prior written permission.
18.\"
19.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
20.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
23.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29.\" SUCH DAMAGE.
30.\"
31.\"	from: @(#)iostat.8	8.1 (Berkeley) 6/6/93
32.\"
33.Dd $Mdocdate: September 17 2022 $
34.Dt IOSTAT 8
35.Os
36.Sh NAME
37.Nm iostat
38.Nd report I/O statistics
39.Sh SYNOPSIS
40.Nm iostat
41.Op Fl CDdIT
42.Op Fl c Ar count
43.Op Fl M Ar core
44.Op Fl N Ar system
45.Op Fl w Ar wait
46.Op Ar drives
47.Sh DESCRIPTION
48.Nm
49displays kernel I/O statistics on terminal, disk and CPU operations.
50By default,
51.Nm
52displays one line of statistics averaged over the machine's run time.
53The
54.Fl I
55option causes
56.Nm iostat
57to print raw, unaveraged values.
58.Pp
59The options are as follows:
60.Bl -tag -width Ds
61.It Fl C
62Show CPU statistics.
63This is enabled by default unless the
64.Fl D ,
65.Fl d ,
66or
67.Fl T
68flags are used.
69.It Fl c Ar count
70Repeat the display
71.Ar count
72times.
73Unless the
74.Fl I
75flag is in effect, the first display is for the time since a reboot and
76each subsequent report is for the time period since the last display.
77Unless overridden by the
78.Fl w
79option, the wait interval between lines is 1 second.
80.It Fl D
81Show alternate disk statistics.
82Displays kilobytes transferred, number of
83transfers, and time spent in transfers.
84Use of this flag disables the default display.
85.It Fl d
86Show disk statistics.
87This is the default.
88Displays kilobytes per
89transfer, number of transfers, and megabytes transferred.
90Use of this flag disables display of CPU and tty statistics.
91.It Fl I
92Show the running total values, rather than an average.
93.It Fl M Ar core
94Extract values associated with the name list from the specified
95.Ar core
96instead of the default
97.Pa /dev/mem .
98.It Fl N Ar system
99Extract the name list from the specified
100.Ar system
101instead of the default
102.Dq Pa /bsd .
103.It Fl T
104Show tty statistics.
105This is enabled by default unless the
106.Fl C ,
107.Fl D ,
108or
109.Fl d
110flags are used.
111.It Fl w Ar wait
112Pause
113.Ar wait
114seconds between each display.
115Unless a
116.Ar count
117is specified via the
118.Fl c
119option,
120.Nm
121will display output until it is interrupted.
122.El
123.Pp
124.Nm
125displays its information in the following format:
126.Bl -tag -width flag
127.It tty
128.Bl -tag -width indent -compact
129.It tin
130characters read from terminals
131.It tout
132characters written to terminals
133.El
134.It disks
135Disk operations.
136The header of the field is the disk name and unit number.
137If more than four disk drives are configured in the system,
138.Nm
139displays only the first four drives.
140To force
141.Nm
142to display specific drives, their names may be supplied on the command
143line.
144.Pp
145.Bl -tag -width indent -compact
146.It KB/t
147Kilobytes transferred per disk transfer
148.It t/s
149Transfers per second
150.It MB/s
151Megabytes transferred per second
152.El
153.Pp
154The alternate display format, selected with
155.Fl D ,
156presents the following values:
157.Pp
158.Bl -tag -width indent -compact
159.It KB
160Kilobytes transferred
161.It xfr
162Disk transfers
163.It time
164Seconds spent in disk activity
165.El
166.It cpu
167.Bl -tag -width indent -compact
168.It \&us
169% of CPU time in user mode
170.It \&ni
171% of CPU time in user mode running niced processes
172.It \&sy
173% of CPU time in system mode
174.It \&sp
175% of CPU time spent spinning
176.It \&in
177% of CPU time processing interrupts
178.It \&id
179% of CPU time in idle mode
180.El
181.El
182.Sh FILES
183.Bl -tag -width /dev/mem -compact
184.It Pa /bsd
185default kernel namelist
186.It Pa /dev/mem
187default memory file
188.El
189.Sh SEE ALSO
190.Xr fstat 1 ,
191.Xr netstat 1 ,
192.Xr nfsstat 1 ,
193.Xr ps 1 ,
194.Xr systat 1 ,
195.Xr top 1 ,
196.Xr pstat 8 ,
197.Xr vmstat 8
198.Pp
199The sections starting with
200.Dq Interpreting system activity
201in
202.%T "Installing and Operating 4.3BSD" .
203