]> git.saurik.com Git - apple/system_cmds.git/blame_incremental - iostat.tproj/iostat.8
system_cmds-880.100.5.tar.gz
[apple/system_cmds.git] / iostat.tproj / iostat.8
... / ...
CommitLineData
1.\"
2.\" Copyright (c) 1997 Kenneth D. Merry.
3.\" All rights reserved.
4.\"
5.\" Redistribution and use in source and binary forms, with or without
6.\" modification, are permitted provided that the following conditions
7.\" are met:
8.\" 1. Redistributions of source code must retain the above copyright
9.\" notice, this list of conditions and the following disclaimer.
10.\" 2. Redistributions in binary form must reproduce the above copyright
11.\" notice, this list of conditions and the following disclaimer in the
12.\" documentation and/or other materials provided with the distribution.
13.\" 3. The name of the author may not be used to endorse or promote products
14.\" derived from this software without specific prior written permission.
15.\"
16.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
17.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
20.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26.\" SUCH DAMAGE.
27.\"
28.\" $FreeBSD$
29.\"
30.\" Copyright (c) 1985, 1991, 1993
31.\" The Regents of the University of California. All rights reserved.
32.\"
33.\" Redistribution and use in source and binary forms, with or without
34.\" modification, are permitted provided that the following conditions
35.\" are met:
36.\" 1. Redistributions of source code must retain the above copyright
37.\" notice, this list of conditions and the following disclaimer.
38.\" 2. Redistributions in binary form must reproduce the above copyright
39.\" notice, this list of conditions and the following disclaimer in the
40.\" documentation and/or other materials provided with the distribution.
41.\" 3. Neither the name of the University nor the names of its contributors
42.\" may be used to endorse or promote products derived from this software
43.\" without specific prior written permission.
44.\"
45.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
46.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
47.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
48.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
49.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
50.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
51.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
52.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
53.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
54.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
55.\" SUCH DAMAGE.
56.\"
57.\" @(#)iostat.8 8.1 (Berkeley) 6/6/93
58.\"
59.Dd May 22, 2015
60.Dt IOSTAT 8
61.Os
62.Sh NAME
63.Nm iostat
64.Nd report
65.Tn I/O
66statistics
67.Sh SYNOPSIS
68.Nm
69.Op Fl CUdKIoT?\&
70.Op Fl c Ar count
71.Op Fl n Ar devs
72.Op Fl w Ar wait
73.Op Ar drives
74.Sh DESCRIPTION
75The
76.Nm
77utility displays kernel
78.Tn I/O
79statistics on terminal, device and cpu operations.
80The first statistics that are printed are averaged over the system uptime.
81To get information about the current activity, a suitable wait time should
82be specified, so that the subsequent sets of printed statistics will be
83averaged over that time.
84.Pp
85The options are as follows:
86.Bl -tag -width flag
87.It Fl ?\&
88Display a usage statement and exit.
89.It Fl c
90Repeat the display
91.Ar count
92times.
93If no
94.Ar wait
95interval is specified, the default is 1 second.
96.It Fl C
97Display CPU statistics.
98This is on by default, unless
99.Fl d
100is specified.
101.It Fl d
102Display only device statistics.
103If this flag is turned on, only device statistics will be displayed, unless
104.Fl C
105or
106.Fl U
107or
108.Fl T
109is also specified to enable the display of CPU, load average or TTY statistics.
110.It Fl I
111Display total statistics for a given time period, rather than average
112statistics for each second during that time period.
113.It Fl K
114In the blocks transferred display (-o), display block count in kilobytes rather
115then the device native block size.
116.It Fl n
117Display up to
118.Ar devs
119number of devices.
120The
121.Nm
122utility will display fewer devices if there are not
123.Ar devs
124devices present.
125.It Fl o
126Display old-style
127.Nm
128device statistics.
129Sectors per second, transfers per second, and milliseconds per seek are
130displayed.
131If
132.Fl I
133is specified, total blocks/sectors, total transfers, and
134milliseconds per seek are displayed.
135.It Fl T
136Display TTY statistics.
137This is on by default, unless
138.Fl d
139is specified.
140.It Fl U
141Display system load averages.
142This is on by default, unless
143.Fl d
144is specified.
145.It Fl w
146Pause
147.Ar wait
148seconds between each display.
149If no repeat
150.Ar count
151is specified, the default is infinity.
152.El
153.Pp
154The
155.Nm
156utility displays its information in the following format:
157.Bl -tag -width flag
158.It tty
159.Bl -tag -width indent -compact
160.It tin
161characters read from terminals
162.It tout
163characters written to terminals
164.El
165.It devices
166Device operations.
167The header of the field is the device name and unit number.
168The
169.Nm
170utility
171will display as many devices as will fit in a standard 80 column screen, or
172the maximum number of devices in the system, whichever is smaller.
173If
174.Fl n
175is specified on the command line,
176.Nm
177will display the smaller of the
178requested number of devices, and the maximum number of devices in the system.
179To force
180.Nm
181to display specific drives, their names may be supplied on the command
182line.
183The
184.Nm
185utility
186will not display more devices than will fit in an 80 column screen, unless
187the
188.Fl n
189argument is given on the command line to specify a maximum number of
190devices to display, or the list of specified devices exceeds 80 columns.
191If fewer devices are specified on the command line than will fit in an 80
192column screen,
193.Nm
194will show only the specified devices.
195.Pp
196The standard
197.Nm
198device display shows the following statistics:
199.Pp
200.Bl -tag -width indent -compact
201.It KB/t
202kilobytes per transfer
203.It tps
204transfers per second
205.It MB/s
206megabytes per second
207.El
208.Pp
209The standard
210.Nm
211device display, with the
212.Fl I
213flag specified, shows the following statistics:
214.Pp
215.Bl -tag -width indent -compact
216.It KB/t
217kilobytes per transfer
218.It xfrs
219total number of transfers
220.It MB
221total number of megabytes transferred
222.El
223.Pp
224The old-style
225.Nm
226display (using
227.Fl o )
228shows the following statistics:
229.Pp
230.Bl -tag -width indent -compact
231.It sps
232sectors transferred per second
233.It tps
234transfers per second
235.It msps
236average milliseconds per transaction
237.El
238.Pp
239The old-style
240.Nm
241display, with the
242.Fl I
243flag specified, shows the following statistics:
244.Pp
245.Bl -tag -width indent -compact
246.It blk
247total blocks/sectors transferred
248.It xfr
249total transfers
250.It msps
251average milliseconds per transaction
252.El
253.It cpu
254.Bl -tag -width indent -compact
255.It \&us
256% of cpu time in user mode
257.It \&sy
258% of cpu time in system mode
259.It \&id
260% of cpu time in idle mode
261.El
262.El
263.Sh EXAMPLES
264.Dl iostat -w 1 disk0 disk2
265.Pp
266Display statistics for the first and third disk devices device every
267second ad infinitum.
268.Pp
269.Dl iostat -c 2
270.Pp
271Display the statistics for the first four devices in the system twice, with
272a one second display interval.
273.Pp
274.Dl iostat -Iw 3
275.Pp
276Display total statistics every three seconds ad infinitum.
277.Pp
278.Dl iostat -odICTw 2 -c 9
279.Pp
280Display total statistics using the old-style output format 9 times, with
281a two second interval between each measurement/display.
282The
283.Fl d
284flag generally disables the TTY and CPU displays, but since the
285.Fl T
286and
287.Fl C
288flags are given, the TTY and CPU displays will be displayed.
289.Sh SEE ALSO
290.Xr netstat 1 ,
291.Xr nfsstat 1 ,
292.Xr ps 1 ,
293.Xr top 1 ,
294.Xr vm_stat 1
295.Pp
296The sections starting with ``Interpreting system activity'' in
297.%T "Installing and Operating 4.3BSD" .
298.Sh HISTORY
299This version of
300.Nm
301first appeared in
302.Fx 3.0 .