1IOSTAT(1)                     Linux User's Manual                    IOSTAT(1)
2
3
4

NAME

6       iostat - Report Central Processing Unit (CPU) statistics and input/out‐
7       put statistics for devices and partitions.
8

SYNOPSIS

10       iostat [ -c ] [ -d ] [ -h ] [ -k | -m ] [ -N ] [ -s ] [ -t ] [ -V  ]  [
11       -x  ] [ -y ] [ -z ] [ -j { ID | LABEL | PATH | UUID | ... } ] [ -o JSON
12       ] [ [ -H ] -g group_name ] [ --human ] [ -p [ device [,...] | ALL ] ] [
13       device [...] | ALL ] [ interval [ count ] ]
14

DESCRIPTION

16       The  iostat  command  is used for monitoring system input/output device
17       loading by observing the time the devices are  active  in  relation  to
18       their average transfer rates. The iostat command generates reports that
19       can be used to  change  system  configuration  to  better  balance  the
20       input/output load between physical disks.
21
22       The  first  report  generated by the iostat command provides statistics
23       concerning the time since the system was booted, unless the  -y  option
24       is  used (in this case, this first report is omitted).  Each subsequent
25       report covers the time since the previous report.  All  statistics  are
26       reported  each time the iostat command is run. The report consists of a
27       CPU header row followed by a row of CPU statistics.  On  multiprocessor
28       systems,  CPU  statistics  are calculated system-wide as averages among
29       all processors. A device header row is displayed followed by a line  of
30       statistics for each device that is configured.
31
32       The  interval parameter specifies the amount of time in seconds between
33       each report. The count parameter can be specified in  conjunction  with
34       the  interval parameter. If the count parameter is specified, the value
35       of count determines the number of reports generated at interval seconds
36       apart. If the interval parameter is specified without the count parame‐
37       ter, the iostat command generates reports continuously.
38
39

REPORTS

41       The iostat command generates two types of reports, the CPU  Utilization
42       report and the Device Utilization report.
43
44       CPU Utilization Report
45              The first report generated by the iostat command is the CPU Uti‐
46              lization Report. For multiprocessor systems, the CPU values  are
47              global  averages  among all processors.  The report has the fol‐
48              lowing format:
49
50              %user
51                     Show the percentage  of  CPU  utilization  that  occurred
52                     while executing at the user level (application).
53
54              %nice
55                     Show  the  percentage  of  CPU  utilization that occurred
56                     while executing at the user level with nice priority.
57
58              %system
59                     Show the percentage  of  CPU  utilization  that  occurred
60                     while executing at the system level (kernel).
61
62              %iowait
63                     Show  the  percentage  of  time that the CPU or CPUs were
64                     idle during which the system had an outstanding disk  I/O
65                     request.
66
67              %steal
68                     Show  the percentage of time spent in involuntary wait by
69                     the virtual CPU or CPUs while the hypervisor was  servic‐
70                     ing another virtual processor.
71
72              %idle
73                     Show  the  percentage  of  time that the CPU or CPUs were
74                     idle and the system did not have an outstanding disk  I/O
75                     request.
76
77       Device Utilization Report
78              The  second report generated by the iostat command is the Device
79              Utilization Report. The device report provides statistics  on  a
80              per physical device or partition basis. Block devices and parti‐
81              tions for which statistics are to be displayed may be entered on
82              the  command  line.  If no device nor partition is entered, then
83              statistics are displayed for every device used  by  the  system,
84              and  providing  that the kernel maintains statistics for it.  If
85              the ALL keyword is given on the command  line,  then  statistics
86              are  displayed for every device defined by the system, including
87              those that have never been used.  Transfer rates are shown in 1K
88              blocks  by default, unless the environment variable POSIXLY_COR‐
89              RECT is set, in which case 512-byte blocks are used.  The report
90              may show the following fields, depending on the flags used:
91
92              Device:
93                     This  column  gives  the  device  (or  partition) name as
94                     listed in the /dev directory.
95
96              tps
97                     Indicate the number of transfers  per  second  that  were
98                     issued to the device. A transfer is an I/O request to the
99                     device. Multiple logical requests can be combined into  a
100                     single  I/O request to the device. A transfer is of inde‐
101                     terminate size.
102
103              Blk_read/s (kB_read/s, MB_read/s)
104                     Indicate  the  amount  of  data  read  from  the   device
105                     expressed  in  a  number of blocks (kilobytes, megabytes)
106                     per second. Blocks are equivalent to sectors  and  there‐
107                     fore have a size of 512 bytes.
108
109              Blk_wrtn/s (kB_wrtn/s, MB_wrtn/s)
110                     Indicate  the  amount  of  data  written  to  the  device
111                     expressed in a number of  blocks  (kilobytes,  megabytes)
112                     per second.
113
114              Blk_read (kB_read, MB_read)
115                     The total number of blocks (kilobytes, megabytes) read.
116
117              Blk_wrtn (kB_wrtn, MB_wrtn)
118                     The  total  number of blocks (kilobytes, megabytes) writ‐
119                     ten.
120
121              r/s
122                     The number (after merges) of read requests completed  per
123                     second for the device.
124
125              w/s
126                     The number (after merges) of write requests completed per
127                     second for the device.
128
129              sec/s (kB/s, MB/s)
130                     The number of sectors (kilobytes, megabytes) read from or
131                     written to the device per second.
132
133              rsec/s (rkB/s, rMB/s)
134                     The  number  of  sectors (kilobytes, megabytes) read from
135                     the device per second.
136
137              wsec/s (wkB/s, wMB/s)
138                     The number of sectors (kilobytes, megabytes)  written  to
139                     the device per second.
140
141              rqm/s
142                     The  number  of  I/O requests merged per second that were
143                     queued to the device.
144
145              rrqm/s
146                     The number of read requests merged per second  that  were
147                     queued to the device.
148
149              wrqm/s
150                     The  number of write requests merged per second that were
151                     queued to the device.
152
153              %rrqm
154                     The percentage of read requests  merged  together  before
155                     being sent to the device.
156
157              %wrqm
158                     The  percentage  of write requests merged together before
159                     being sent to the device.
160
161              areq-sz
162                     The average size (in kilobytes) of the I/O requests  that
163                     were issued to the device.
164                     Note:  In  previous  versions,  this  field  was known as
165                     avgrq-sz and was expressed in sectors.
166
167              rareq-sz
168                     The average size (in kilobytes) of the read requests that
169                     were issued to the device.
170
171              wareq-sz
172                     The  average  size  (in  kilobytes) of the write requests
173                     that were issued to the device.
174
175              await
176                     The average  time  (in  milliseconds)  for  I/O  requests
177                     issued to the device to be served. This includes the time
178                     spent by the requests in queue and the time spent servic‐
179                     ing them.
180
181              r_await
182                     The  average  time  (in  milliseconds)  for read requests
183                     issued to the device to be served. This includes the time
184                     spent by the requests in queue and the time spent servic‐
185                     ing them.
186
187              w_await
188                     The average time (in  milliseconds)  for  write  requests
189                     issued to the device to be served. This includes the time
190                     spent by the requests in queue and the time spent servic‐
191                     ing them.
192
193              aqu-sz
194                     The average queue length of the requests that were issued
195                     to the device.
196                     Note: In previous  versions,  this  field  was  known  as
197                     avgqu-sz.
198
199              svctm
200                     The  average  service  time  (in  milliseconds)  for  I/O
201                     requests that were issued to the device. Warning! Do  not
202                     trust this field any more.  This field will be removed in
203                     a future sysstat version.
204
205              %util
206                     Percentage of elapsed time during which I/O requests were
207                     issued  to  the  device  (bandwidth  utilization  for the
208                     device). Device saturation  occurs  when  this  value  is
209                     close to 100% for devices serving requests serially.  But
210                     for devices serving requests in parallel,  such  as  RAID
211                     arrays  and  modern  SSDs,  this  number does not reflect
212                     their performance limits.
213

OPTIONS

215       -c     Display the CPU utilization report.
216
217       -d     Display the device utilization report.
218
219       -g group_name { device [...] | ALL }
220              Display statistics for a group of devices.  The  iostat  command
221              reports statistics for each individual device in the list then a
222              line of global statistics for the group displayed as  group_name
223              and  made  up  of  all  the devices in the list. The ALL keyword
224              means that all the block devices defined by the system shall  be
225              included in the group.
226
227       -H     This  option must be used with option -g and indicates that only
228              global statistics for the group are to  be  displayed,  and  not
229              statistics for individual devices in the group.
230
231       -h     Make  the  Device  Utilization Report easier to read by a human.
232              --human is enabled implicitly with this option.
233
234       --human
235              Print sizes in human readable format  (e.g.  1.0k,  1.2M,  etc.)
236              The units displayed with this option supersede any other default
237              units (e.g.  kilobytes, sectors...) associated with the metrics.
238
239       -j { ID | LABEL | PATH | UUID | ... } [ device [...] | ALL ]
240              Display persistent device names. Options ID, LABEL, etc. specify
241              the  type of the persistent name. These options are not limited,
242              only prerequisite is that  directory  with  required  persistent
243              names is present in /dev/disk.  Optionally, multiple devices can
244              be specified in the chosen persistent name type.   Because  per‐
245              sistent device names are usually long, option
246
247       -k     Display statistics in kilobytes per second.
248
249       -m     Display statistics in megabytes per second.
250
251       -N     Display the registered device mapper names for any device mapper
252              devices.  Useful for viewing LVM2 statistics.
253
254       -o JSON
255              Display the statistics in JSON (Javascript Object Notation) for‐
256              mat.   JSON  output field order is undefined, and new fields may
257              be added in the future.
258
259       -p [ { device [,...] | ALL } ]
260              The -p option displays statistics  for  block  devices  and  all
261              their  partitions that are used by the system.  If a device name
262              is entered on the command line, then statistics for it  and  all
263              its  partitions  are  displayed. Last, the ALL keyword indicates
264              that statistics have to be displayed for all the  block  devices
265              and  partitions defined by the system, including those that have
266              never been used. If option -j is  defined  before  this  option,
267              devices  entered  on  the command line can be specified with the
268              chosen persistent name type.
269
270       -s     Display a short (narrow) version of the report that  should  fit
271              in 80 characters wide screens.
272
273       -t     Print  the  time for each report displayed. The timestamp format
274              may depend on the value of the S_TIME_FORMAT  environment  vari‐
275              able (see below).
276
277       -V     Print version number then exit.
278
279       -x     Display extended statistics.
280
281       -y     Omit first report with statistics since system boot, if display‐
282              ing multiple records at given interval.
283
284       -z     Tell iostat to omit output for any devices for which  there  was
285              no activity during the sample period.
286
287

ENVIRONMENT

289       The  iostat  command takes into account the following environment vari‐
290       ables:
291
292
293       POSIXLY_CORRECT
294              When this variable is set, transfer rates are shown in  512-byte
295              blocks instead of the default 1K blocks.
296
297
298       S_COLORS
299              When  this  variable  is set, display statistics in color on the
300              terminal.  Possible values for this variable are  never,  always
301              or auto (the latter is the default).
302
303              Please  note  that  the  color (being red, yellow, or some other
304              color) used to display a value is not indicative of any kind  of
305              issue  simply  because of the color. It only indicates different
306              ranges of values.
307
308
309       S_COLORS_SGR
310              Specify the colors and other attributes used to display  statis‐
311              tics  on  the  terminal.  Its value is a colon-separated list of
312              capabilities            that             defaults             to
313              H=31;1:I=32;22:M=35;1:N=34;1:Z=34;22.    Supported  capabilities
314              are:
315
316
317              H=     SGR (Select Graphic Rendition) substring  for  percentage
318                     values greater than or equal to 75%.
319
320
321              I=     SGR substring for device names.
322
323
324              M=     SGR substring for percentage values in the range from 50%
325                     to 75%.
326
327
328              N=     SGR substring for non-zero statistics values.
329
330
331              Z=     SGR substring for zero values.
332
333
334       S_TIME_FORMAT
335              If this variable exists and its value is ISO  then  the  current
336              locale  will  be  ignored  when  printing the date in the report
337              header. The iostat command will use the ISO 8601  format  (YYYY-
338              MM-DD)  instead.   The  timestamp  displayed with option -t will
339              also be compliant with ISO 8601 format.
340
341

EXAMPLES

343       iostat
344              Display a single history since  boot  report  for  all  CPU  and
345              Devices.
346
347       iostat -d 2
348              Display a continuous device report at two second intervals.
349
350       iostat -d 2 6
351              Display six reports at two second intervals for all devices.
352
353       iostat -x sda sdb 2 6
354              Display  six reports of extended statistics at two second inter‐
355              vals for devices sda and sdb.
356
357       iostat -p sda 2 6
358              Display six reports at two second intervals for device  sda  and
359              all its partitions (sda1, etc.)
360

BUGS

362       /proc filesystem must be mounted for iostat to work.
363
364       Kernels older than 2.6.x are no longer supported.
365
366       The  average  service  time  (svctm field) value is meaningless, as I/O
367       statistics are now calculated at block level, and we  don't  know  when
368       the  disk  driver  starts  to  process a request. For this reason, this
369       field will be removed in a future sysstat version.
370

FILES

372       /proc/stat contains system statistics.
373
374       /proc/uptime contains system uptime.
375
376       /proc/diskstats contains disks statistics.
377
378       /sys contains statistics for block devices.
379
380       /proc/self/mountstats contains statistics for network filesystems.
381
382       /dev/disk contains persistent device names.
383

AUTHOR

385       Sebastien Godard (sysstat <at> orange.fr)
386

SEE ALSO

388       sar(1), pidstat(1), mpstat(1),  vmstat(8),  tapestat(1),  nfsiostat(1),
389       cifsiostat(1)
390
391       http://pagesperso-orange.fr/sebastien.godard/
392
393
394
395Linux                            JANUARY 2018                        IOSTAT(1)
Impressum