1 .TH IOSTAT 1 "JULY 2018" Linux "Linux User's Manual" -*- nroff -*-
3 iostat \- Report Central Processing Unit (CPU) statistics and input/output
4 statistics for devices and partitions.
7 .B iostat [ -c ] [ -d ] [ -h ] [ -k | -m ] [ -N ] [ -s ] [ -t ] [ -V ] [ -x ] [ -y ] [ -z ]
8 .B [ --dec={ 0 | 1 | 2 } ] [ -j { ID | LABEL | PATH | UUID | ... } ] [ -o JSON ]
11 .B ] [ --human ] [ -p [
15 .B [...] | ALL ] [ --debuginfo ] [
22 .B iostat [ -c ] [ -d ] [ -h ] [ -k | -m ] [ -N ] [ -s ] [ -t ] [ -V ] [ -x ] [ -y ] [ -z ]
23 .B [ --dec={ 0 | 1 | 2 } ] [ -j { ID | LABEL | PATH | UUID | ... } ] [ -o JSON ]
26 .B ] [ --human ] [ -p [
39 command is used for monitoring system input/output device
40 loading by observing the time the devices are active in relation
41 to their average transfer rates. The
43 command generates reports
44 that can be used to change system configuration to better balance
45 the input/output load between physical disks.
47 The first report generated by the
49 command provides statistics
50 concerning the time since the system was booted, unless the
52 option is used (in this case, this first report is omitted).
53 Each subsequent report
54 covers the time since the previous report. All statistics are reported
57 command is run. The report consists of a
58 CPU header row followed by a row of
60 multiprocessor systems, CPU statistics are calculated system-wide
61 as averages among all processors. A device header row is displayed
62 followed by a line of statistics for each device that is configured.
66 parameter specifies the amount of time in seconds between
69 parameter can be specified in conjunction with the
73 parameter is specified, the value of
75 determines the number of reports generated at
79 parameter is specified without the
83 command generates reports continuously.
88 command generates two types of reports, the CPU
89 Utilization report and the Device Utilization report.
90 .IP "CPU Utilization Report"
91 The first report generated by the
94 Utilization Report. For multiprocessor systems, the CPU values are
95 global averages among all processors.
96 The report has the following format:
101 Show the percentage of CPU utilization that occurred while
102 executing at the user level (application).
107 Show the percentage of CPU utilization that occurred while
108 executing at the user level with nice priority.
113 Show the percentage of CPU utilization that occurred while
114 executing at the system level (kernel).
119 Show the percentage of time that the CPU or CPUs were idle during which
120 the system had an outstanding disk I/O request.
125 Show the percentage of time spent in involuntary wait by the virtual CPU
126 or CPUs while the hypervisor was servicing another virtual processor.
131 Show the percentage of time that the CPU or CPUs were idle and the system
132 did not have an outstanding disk I/O request.
135 .IP "Device Utilization Report"
136 The second report generated by the
138 command is the Device Utilization
139 Report. The device report provides statistics on a per physical device
140 or partition basis. Block devices and partitions for which statistics are
141 to be displayed may be entered on the command line.
142 If no device nor partition
143 is entered, then statistics are displayed
144 for every device used by the system, and
145 providing that the kernel maintains statistics for it.
148 keyword is given on the command line, then statistics are
149 displayed for every device defined by the system, including those
150 that have never been used.
151 Transfer rates are shown in 1K blocks by default, unless the environment
152 variable POSIXLY_CORRECT is set, in which case 512-byte blocks are used.
153 The report may show the following fields,
154 depending on the flags used:
159 This column gives the device (or partition) name as listed in the /dev
165 Indicate the number of transfers per second that were issued
166 to the device. A transfer is an I/O request to the
167 device. Multiple logical requests can be combined into a single I/O
168 request to the device. A transfer is of indeterminate size.
171 .B Blk_read/s (kB_read/s, MB_read/s)
173 Indicate the amount of data read from the device expressed in a number of
174 blocks (kilobytes, megabytes) per second. Blocks are equivalent to sectors
175 and therefore have a size of 512 bytes.
178 .B Blk_wrtn/s (kB_wrtn/s, MB_wrtn/s)
180 Indicate the amount of data written to the device expressed in a number of
181 blocks (kilobytes, megabytes) per second.
184 .B Blk_read (kB_read, MB_read)
186 The total number of blocks (kilobytes, megabytes) read.
189 .B Blk_wrtn (kB_wrtn, MB_wrtn)
191 The total number of blocks (kilobytes, megabytes) written.
196 The number (after merges) of read requests completed per second for the device.
201 The number (after merges) of write requests completed per second for the device.
204 .B sec/s (kB/s, MB/s)
206 The number of sectors (kilobytes, megabytes) read from or written to the device
210 .B rsec/s (rkB/s, rMB/s)
212 The number of sectors (kilobytes, megabytes) read from the device per second.
215 .B wsec/s (wkB/s, wMB/s)
217 The number of sectors (kilobytes, megabytes) written to the device per second.
222 The number of I/O requests merged per second that were queued to the device.
227 The number of read requests merged per second that were queued to the device.
232 The number of write requests merged per second that were queued to the device.
237 The percentage of read requests merged together before being sent to the device.
242 The percentage of write requests merged together before being sent to the device.
247 The average size (in kilobytes) of the I/O requests that were issued to the device.
249 Note: In previous versions, this field was known as avgrq-sz and was expressed in
255 The average size (in kilobytes) of the read requests that were issued to the
261 The average size (in kilobytes) of the write requests that were issued to the
267 The average time (in milliseconds) for I/O requests issued to the device
268 to be served. This includes the time spent by the requests in queue and
269 the time spent servicing them.
274 The average time (in milliseconds) for read requests issued to the device
275 to be served. This includes the time spent by the requests in queue and
276 the time spent servicing them.
281 The average time (in milliseconds) for write requests issued to the device
282 to be served. This includes the time spent by the requests in queue and
283 the time spent servicing them.
288 The average queue length of the requests that were issued to the device.
290 Note: In previous versions, this field was known as avgqu-sz.
295 The average service time (in milliseconds) for I/O requests that were issued
296 to the device. Warning! Do not trust this field any more.
297 This field will be removed in a future sysstat version.
302 Percentage of elapsed time during which I/O requests were issued to the device
303 (bandwidth utilization for the device). Device saturation occurs when this
304 value is close to 100% for devices serving requests serially.
305 But for devices serving requests in parallel, such as RAID arrays and
306 modern SSDs, this number does not reflect their performance limits.
311 Display the CPU utilization report.
313 Display the device utilization report.
316 Print debug output to stderr.
318 .IP "--dec={ 0 | 1 | 2 }"
319 Specify the number of decimal places to use (0 to 2, default value is 2).
320 .IP "-g group_name { device [...] | ALL }
321 Display statistics for a group of devices.
324 command reports statistics for each individual device in the list
325 then a line of global statistics for the group displayed as
327 and made up of all the devices in the list. The
329 keyword means that all the block devices defined by the system shall be
330 included in the group.
332 This option must be used with option -g and indicates that only global
333 statistics for the group are to be displayed, and not statistics for
334 individual devices in the group.
336 Make the Device Utilization Report easier to read by a human.
338 is enabled implicitly with this option.
340 Print sizes in human readable format (e.g. 1.0k, 1.2M, etc.)
341 The units displayed with this option supersede any other default units (e.g.
342 kilobytes, sectors...) associated with the metrics.
343 .IP "-j { ID | LABEL | PATH | UUID | ... } [ device [...] | ALL ]"
344 Display persistent device names. Options
347 etc. specify the type of the persistent name. These options are not limited,
348 only prerequisite is that directory with required persistent names is present in
350 Optionally, multiple devices can be specified in the chosen persistent name type.
351 Because persistent device names are usually long, option
353 Display statistics in kilobytes per second.
355 Display statistics in megabytes per second.
357 Display the registered device mapper names for any device mapper devices.
358 Useful for viewing LVM2 statistics.
360 Display the statistics in JSON (Javascript Object Notation) format.
361 JSON output field order is undefined, and new fields may be added
363 .IP "-p [ { device [,...] | ALL } ]"
364 The -p option displays statistics for
365 block devices and all their partitions that are used by the system.
366 If a device name is entered on the command line, then statistics for it
367 and all its partitions are displayed. Last, the
369 keyword indicates that statistics have to be displayed for all the block
370 devices and partitions defined by the system, including those that have
371 never been used. If option
373 is defined before this option, devices entered on the command line can be
374 specified with the chosen persistent name type.
376 Display a short (narrow) version of the report that should fit in 80
377 characters wide screens.
379 Print the time for each report displayed. The timestamp format may depend
380 on the value of the S_TIME_FORMAT environment variable (see below).
382 Print version number then exit.
384 Display extended statistics.
386 Omit first report with statistics since system boot, if displaying
387 multiple records at given interval.
391 to omit output for any devices for which there was no activity
392 during the sample period.
397 command takes into account the following environment variables:
400 When this variable is set, transfer rates are shown in 512-byte blocks instead
401 of the default 1K blocks.
404 When this variable is set, display statistics in color on the terminal.
405 Possible values for this variable are
410 (the latter is the default).
412 Please note that the color (being red, yellow, or some other color) used to display a value
413 is not indicative of any kind of issue simply because of the color. It only indicates different
417 Specify the colors and other attributes used to display statistics on the terminal.
418 Its value is a colon-separated list of capabilities that defaults to
419 .BR H=31;1:I=32;22:M=35;1:N=34;1:Z=34;22 .
420 Supported capabilities are:
425 SGR (Select Graphic Rendition) substring for percentage values greater than or equal to 75%.
429 SGR substring for device names.
433 SGR substring for percentage values in the range from 50% to 75%.
437 SGR substring for non-zero statistics values.
441 SGR substring for zero values.
445 If this variable exists and its value is
447 then the current locale will be ignored when printing the date in the report
450 command will use the ISO 8601 format (YYYY-MM-DD) instead.
451 The timestamp displayed with option -t will also be compliant with ISO 8601
457 Display a single history since boot report for all CPU and Devices.
462 Display a continuous device report at two second intervals.
467 Display six reports at two second intervals for all devices.
470 .B iostat -x sda sdb 2 6
472 Display six reports of extended statistics at two second intervals for devices
478 Display six reports at two second intervals for device sda and all its
479 partitions (sda1, etc.)
482 filesystem must be mounted for
486 Kernels older than 2.6.x are no longer supported.
488 The average service time (svctm field) value is meaningless,
489 as I/O statistics are now calculated at block level, and we don't know
490 when the disk driver starts to process a request. For this reason,
491 this field will be removed in a future sysstat version.
494 contains system statistics.
497 contains system uptime.
500 contains disks statistics.
503 contains statistics for block devices.
505 .I /proc/self/mountstats
506 contains statistics for network filesystems.
509 contains persistent device names.
511 Sebastien Godard (sysstat <at> orange.fr)
521 .I https://github.com/sysstat/sysstat
523 .I http://pagesperso-orange.fr/sebastien.godard/