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