Reports Central Processing Unit (CPU) statistics, asynchronous input/output (AIO) and input/output statistics for the entire system, adapters, TTY devices, disks CD-ROMs, tapes and file systems.
iostat [ -a ] [-b] [ -l ] [ -s ] [ -t ] [ -T ] [-V] [ -z ] [ { -A [ -P ] [ -q | -Q ] } | { [ -d | -p ] [ -D ] [ -R ] }[ -m ] ] [ { -f | -F } [ filesystems,… ] ][ -S power] [ -@ wparname | ALL | Global ] [ drives ... ] [ interval] [ count ]
iostat [-X [-o filename]] [interval[count]]
Restriction: The -a, -b, -t, -z, -A, -P, -q, -Q, -p, -R, -m flags and the wparname parameter are restricted inside workload partitions.
The iostat command is used to monitor system input/output (I/O) devices (physical and logical) that are loaded, by observing the time for which these devices are active. The iostat command also generates reports that can be used to change system configuration to better balance the I/O load between file systems, physical volumes, and adapters.
The iostat command generates an XML file when the –X option is specified.
The iostat command generates various utilization and throughput reports based on the options that you specify. On multiprocessor systems, CPU statistics are calculated system-wide as averages among all processors.
A report generated by the iostat command consists of system configuration information and various utilization and throughput reports. The system configuration row displays at the start of the iostat command and whenever there is a change in monitored configuration. In addition to system configuration, WPAR configuration is also displayed for the WPAR that has enforced resource limits when the -@ flag is used.
The Interval parameter specifies the amount of time in seconds between each report. If the Interval parameter is not specified, the iostat command generates a single report containing statistics for the time since system startup (boot). The Count parameter can be specified in conjunction with the Interval parameter. If the Count parameter is specified, the value of count determines the number of reports generated at Interval seconds apart. If the Interval parameter is specified without the Count parameter, the iostat command generates reports continuously.
The iostat command is useful in determining whether a physical volume is becoming a performance bottleneck and if there is potential to improve the situation. The % utilization field for the physical volumes indicates how evenly the file activity is spread across the drives. A high % utilization on a physical volume is a good indication that there may be contention for this resource. Since the CPU utilization statistics are also available with the iostat report, the percentage of time the CPU is in I/O wait can be determined at the same time. Consider distributing data across drives if the I/O wait time is significant and the disk utilization is not evenly distributed across volumes.
Beginning with AIX® 5.3, the iostat command reports number of physical processors consumed (physc) and the percentage of entitlement consumed (% entc) in Micro-Partitioning® environments. These metrics will only be displayed on Micro-Partitioning environments.
If the Drive parameter is specified, only those names specified are displayed. One or more alphabetic or alphanumeric values can be specified for Drives. If you specify the Drive parameter, the TTY and CPU reports are displayed and the disk or tape report contains statistics for the specified drives. If a drive name that you specified is not found, the report lists that name and displays the message Drive Not Found and gives the report of all the available drives on the system. If you did not configure drives on the system, no disk or tape report is generated.
Restriction: The first character in the Drive parameter cannot be numeric.
Tape utilization report is generated only if you specified the –p or -a flag.
Reports
The iostat command generates four types of reports, the TTY and CPU utilization report, the disk/tape utilization report, the file system utilization report, the system throughput report and the adapter throughput report.
TTY and CPU Utilization Report
The first report generated by the iostat command is the TTY and CPU utilization report. For multiprocessor systems, the CPU values are global averages among all processors. Also, the I/O wait state is defined system-wide and not per processor. The report has the following format:
Column | Description |
---|---|
tin | Shows the total number of characters read by the system for all TTYs. |
tout | Shows the total number of characters written by the system to all TTYs. |
% user | Shows the percentage of CPU utilization that occurred while executing at the user level (application). |
% sys | Shows the percentage of CPU utilization that occurred while executing at the system level (kernel). |
% idle | Shows the percentage of time that the CPU or CPUs were idle and the system did not have an outstanding disk I/O request. |
% iowait | Shows the percentage of time that the CPU or CPUs were idle during which the system had an outstanding disk I/O request. |
physc | Shows the number or the fraction of physical processors consumed, displayed only if the partition is running with shared processor. |
% entc | Shows the percentage of entitled capacity consumed, which is displayed only if the partition is running with shared processor. Because the time base over which this data is computed can vary, the entitled capacity percentage can sometimes exceed 100%. This excess is noticeable only with small sampling intervals. |
% rc | Shows the percentage of the consumed processor resource. The information is displayed only for WPARs with enforced processor-resource limit. |
This information is updated at regular intervals by the kernel (typically sixty times per second). The TTY report provides a collective account of characters per second received from all terminals on the system as well as the collective count of characters output per second to all terminals on the system.
Methods Used to Compute CPU Disk I/O Wait Time
Operating system version 4.3.3 and later contain enhancements to the method used to compute the percentage of CPU time spent waiting on disk I/O (wio time). The method used in AIX 4.3.2 and earlier versions of the operating system can, under certain circumstances, give an inflated view of wio time on SMPs. The wio time is reported by the commands sar (%wio), vmstat (wa) and iostat (% iowait).
The method used in AIX 4.3.2 and earlier versions is as follows: At each clock interrupt on each processor (100 times a second per processor), a determination is made as to which of the four categories (usr/sys/wio/idle) to place the last 10 ms of time. If the CPU was busy in usr mode at the time of the clock interrupt, then usr gets the clock tick added into its category. If the CPU was busy in kernel mode at the time of the clock interrupt, then the sys category gets the tick. If the CPU was not busy, a check is made to see if any I/O to disk is in progress. If any disk I/O is in progress, the wio category is incremented. If no disk I/O is in progress and the CPU is not busy, the idle category gets the tick. The inflated view of wio time results from all idle CPUs being categorized as wio regardless of the number of threads waiting on I/O. For example, systems with just one thread doing I/O could report over 90 percent wio time regardless of the number of CPUs it has.
The method used in AIX 4.3.3 and later is as follows: The change in operating system version 4.3.3 is to only mark an idle CPU as wio if an outstanding I/O was started on that CPU. This method can report much lower wio times when just a few threads are doing I/O and the system is otherwise idle. For example, a system with four CPUs and one thread doing I/O will report a maximum of 25 percent wio time. A system with 12 CPUs and one thread doing I/O will report a maximum of 8 percent wio time. NFS client reads/writes go through the VMM, and the time that biods spend in the VMM waiting for an I/O to complete is now reported as I/O wait time.
Disk/Tape Utilization Report
The second report generated by the iostat command is the disk/tape utilization report. By default, the disk utilization report is displayed, and you must specify the -p flag to display the tape utilization report.
When you specify the -m flag, the path utilization report is displayed.
The disk report provides statistics on a per-physical-disk basis, and tape utilization report provides statistics on a per-tape-basis. The default report has the following format:
Item | Description |
---|---|
% tm_act | Indicates the percentage of time the physical disk/tape was active (bandwidth utilization for the drive). |
Kbps | Indicates the amount of data transferred (read or written) to the drive in KB per second. |
tps | Indicates the number of transfers per second that were issued to the physical disk/tape. A transfer is an I/O request to the physical disk/tape. Multiple logical requests can be combined into a single I/O request to the disk. A transfer is of indeterminate size. |
Kb_read | The total number of KB read. |
Kb_wrtn | The total number of KB written. |
If you specify the -D flag, the report has the following metrics for disk/tape. Extended metrics for disk are displayed by default and users need to specify the –p option for tape utilization report:
Metrics related to transfers (xfer): | |
---|---|
% tm_act | Indicates the percentage of time the physical disk/tape was active (bandwidth utilization for the drive). |
bps | Indicates the amount of data transferred (read or written) per second to the drive. Different suffixes are used to represent the unit of transfer. Default is in bytes per second. |
tps | Indicates the number of transfers per second that were issued to the physical disk/tape. A transfer is an I/O request to the physical disk/tape. Multiple logical requests can be combined into a single I/O request to the disk. A transfer is of indeterminate size. |
bread | Indicates the amount of data read per second, from the drive. Different suffixes are used to represent the unit of transfer. Default is in bytes per second. |
bwrtn | Indicates the amount of data written per second, to the drive. Different suffixes are used to represent the unit of transfer. Default is in bytes per second. |
Read Service Metrics (read): | |
---|---|
rps | Indicates the number of read transfers per second. |
avgserv | Indicates the average service time per read transfer. Different suffixes are used to represent the unit of time. Default is in milliseconds. |
minserv | Indicates the minimum read service time. Different suffixes are used to represent the unit of time. Default is in milliseconds. |
maxserv | Indicates the maximum read service time. Different suffixes are used to represent the unit of time. Default is in milliseconds. |
timeouts | Indicates the number of read timeouts per second. |
fails | Indicates the number of failed read requests per second. |
Write Service Metrics (write): | |
---|---|
wps | Indicates the number of write transfers per second. |
avgserv | Indicates the average service time per write transfer. Different suffixes are used to represent the unit of time. Default is in milliseconds. |
minserv | Indicates the minimum write service time. Different suffixes are used to represent the unit of time. Default is in milliseconds. |
maxserv | Indicates the maximum write service time. Different suffixes are used to represent the unit of time. Default is in milliseconds. |
timeouts | Indicates the number of write timeouts per second. |
fails | Indicates the number of failed write requests per second. |
Item | Description |
---|---|
Wait Queue Service Metrics (queue): | Restriction: These metrics are not applicable for tapes. |
avgtime | Indicates the average time spent by a transfer request in the wait queue. Different suffixes are used to represent the unit of time. Default is in milliseconds. |
mintime | Indicates the minimum time spent by a transfer request in the wait queue. Different suffixes are used to represent the unit of time. Default is in milliseconds. |
maxtime | Indicates the maximum time spent by a transfer request in the wait queue. Different suffixes are used to represent the unit of time. Default is in milliseconds. |
avgwqsz | Indicates the average wait queue size. |
avgsqsz | Indicates the average service queue size. |
sqfull | Indicates the number of times the service queue becomes full (that is, the disk is not accepting any more service requests) per second. |
Suffix | Description |
---|---|
K | 1000 bytes |
M | 1 000 000 bytes if displayed in xfer metrics. Minutes, if displayed in read/write/wait service metrics. |
G | 1 000 000 000 bytes. |
T | 1 000 000 000 000 bytes. |
S | Seconds. |
H | Hour. |
Statistics for CD-ROM devices are also reported.
Block IO Device Utilization Report
The Block IO Device Utilization report provides statistics per IO device. The report helps you in analyzing the IO statistics at VMM or filesystem, and disk layers of IO stack. The report also helps you in analyzing the performance of the IO stack. The default report has the following format:
Item | Description |
---|---|
device | Indicates the device name. |
rbytes | Indicates the number of bytes read over the monitoring interval. Default unit is bytes; a suffix will be appended if required (1024 =K, 1024K =M). |
wbytes | Indicates the number of bytes written over the monitoring interval. Default unit is bytes; a suffix will be appended if required. |
rserv | Indicates the read service time per read over the monitoring interval. Different suffixes are used to represent unit, default unit is millisecond. |
wserv | Indicates the write service time per write over the monitoring interval. Different suffixes are used to represent unit, default unit is millisecond. |
rerr | Indicates the number of read errors over the monitoring interval. Default unit is numbers; a suffix will be appended if required (1000 = K, 1000K = M, 1000M = G). |
werr | Indicates the number of write errors over the monitoring interval. Default unit is numbers; a suffix will be appended if required (1000 = K, 1000K = M, 1000M = G). |
reads | Indicates the number of read requests over the monitoring interval. Default unit is numbers; a suffix will be appended if required (1000 = K, 1000K = M, 1000M = G). |
writes | Indicates the number of write requests over the monitoring interval. Default unit is numbers; a suffix will be appended if required (1000 = K, 1000K = M, 1000M = G). |
System Throughput Report
This report is generated if the -s flag is specified. This report provides statistics for the entire system. This report has the following format:
Item | Description |
---|---|
Kbps | Indicates the amount of data transferred (read or written) in the entire system in KB per second. |
tps | Indicates the number of transfers per second issued to the entire system. |
Kb_read | The total number of KB read from the entire system. |
Kb_wrtn | The total number of KB written to the entire system. |
Tip: The -s flag, when used with the -@ or -f flag, displays logical and physical volume throughput, which corresponds to File Systems and Disks respectively.
Adapter Throughput Report
This report is generated if the -a flag is specified. This report provides statistics on an adapter-by-adapter basis (for both physical and virtual adapters). This report has the following format for a physical adapter report:
Item | Description |
---|---|
Kbps | Indicates the amount of data transferred (read or written) in the adapter in KB per second. |
tps | Indicates the number of transfers per second issued to the adapter. |
Kb_read | The total number of KB read from the adapter. |
Kb_wrtn | The total number of KB written to the adapter. |
The virtual adapter's default throughput report has the following format:
Item | Description |
---|---|
Kbps | Indicates the amount of data transferred (read or written) in the adapter in KB per second. |
tps | Indicates the number of transfers per second issued to the adapter. |
bkread | Number of blocks received per second from the hosting server to this adapter. |
bkwrtn | Number of blocks per second sent from this adapter to the hosting server. |
partition-id | The partition ID of the hosting server, which serves the requests sent by this adapter. |
The virtual adapter's extended throughput report (-D option) has the following format:
Metrics related to transfers (xfer:) | |
---|---|
Kbps | Indicates the amount of data transferred (read or written) in the adapter in KB per second. |
tps | Indicates the number of transfers per second issued to the adapter. |
bkread | Number of blocks received per second from the hosting server to this adapter. |
bkwrtn | Number of blocks per second sent from this adapter to the hosting server. |
partition-id | The partition ID of the hosting server, which serves the requests sent by this adapter. |
Adapter Read Service Metrics (read:) | |
---|---|
rps | Indicates the number of read requests per second. |
avgserv | Indicates the average time to receive a response from the hosting server for the read request sent. Different suffixes are used to represent the unit of time. Default is in milliseconds. |
minserv | Indicates the minimum time to receive a response from the hosting server for the read request sent. Different suffixes are used to represent the unit of time. Default is in milliseconds. |
maxserv | Indicates the maximum time to receive a response from the hosting server for the read request sent. Different suffixes are used to represent the unit of time. Default is in milliseconds. |
Adapter Write Service Metrics (write:) | |
---|---|
wps | Indicates the number of write requests per second. |
avgserv | Indicates the average time to receive a response from the hosting server for the write request sent. Different suffixes are used to represent the unit of time. Default is in milliseconds. |
minserv | Indicates the minimum time to receive a response from the hosting server for the write request sent. Different suffixes are used to represent the unit of time. Default is in milliseconds. |
maxserv | Indicates the maximum time to receive a response from the hosting server for the write request sent. Different suffixes are used to represent the unit of time. Default is in milliseconds. |
Adapter Wait Queue Metrics (queue:) | |
---|---|
avgtime | Indicates the average time spent by a transfer request in the wait queue. Different suffixes are used to represent the unit of time. Default is in milliseconds. |
mintime | Indicates the minimum time spent by a transfer request in the wait queue. Different suffixes are used to represent the unit of time. Default is in milliseconds. |
maxtime | Indicates the maximum time spent by a transfer request in the wait queue. Different suffixes are used to represent the unit of time. Default is in milliseconds. |
avgwqsz | Indicates the average wait queue size. |
avgsqsz | Indicates the average service queue size. |
sqfull | Indicates the number of times the service queue becomes full (that is, the hosting server is not accepting any more service requests) per second. |
Suffix | Description |
---|---|
K | 1000 bytes. |
M | 1 000 000 bytes if displayed in xfer metrics. Minutes, if displayed in read/write/wait service metrics. |
G | 1 000 000 000 bytes. |
T | 1 000 000 000 000 bytes. |
S | Seconds. |
H | Hours. |
Asynchronous I/O Report
Item | Description |
---|---|
avgc | Average global AIO request count per second for the specified interval. |
avfc | Average fastpath request count per second for the specified interval. |
maxgc | Maximum global AIO request count since the last time this value was fetched. |
maxfc | Maximum fastpath request count since the last time this value was fetched. |
maxreqs | Specifies the maximum number of asynchronous I/O requests that can be outstanding at one time. |
File System Utilization Report
The file system utilization report provides statistics on a per-file-system basis. The default report has the following format:
Item | Description |
---|---|
Filesystem | Indicates the file system name. |
% tm_act | Indicates the percentage of time the file system is active. |
Kbps | Indicates the amount of data transferred (read or written) to the file system in KB per second. |
Tps | Indicates the number of transfers per second that are issued to the file system. A transfer is of indeterminate size. |
Kb_read | The total number of KBs read. |
Kb_wrtn | The total number of KBs written. |
Important: You must specify the disk names before you invoke the -f or -F flag. If you specify the -f or -F flag, separate file system names to be monitored by commas.
Item | Description |
---|---|
-a | Displays the adapter throughput report. The -a flag can be specified with the -A flag, but not when the -q or -Q flag is specified. The -a flag is mutually exclusive with the -f or -F flag. |
-A | Displays the legacy asynchronous IO utilization report, and turns off the display of TTY utilization report. |
-b | Displays the block I/O device utilization statistics. The -b flag is mutually exclusive to all flags, except the -T flag. |
-d | Turns off the display of TTY utilization report or CPU utilization report. If you do not specify the -d or -p flag, then by default the -d flag is turned on. The -t and -d flags together turn off both disks and TTY or CPU statistics, allowed only with the -a or -s flags. The -d flag is mutually exclusive with the -t flag unless you specify the -a or -s flag, too. The -d flag is mutually exclusive with the -p flag unless you specify the -a or -s flag, too. |
-D | Displays the extended tape/drive utilization report. Use the -D flag with the -d or -p flag. The -D flag is mutually exclusive with the -t flag unless you specify the -a or -s flag, too. The -D flag is mutually exclusive with the -f or -F flag. |
-f | Displays the file system utilization report. The -f flag is mutually exclusive with the -a or -D flag. The -f flag can be specified with the -A flag, but not when the -q or -Q flag is specified. |
-F | Displays the file system utilization report, and turns off other utilization reports. The -F flag is mutually exclusive with the -a or -D flag. The -F flag can be specified with the -A flag, but not when the -q or -Q flag is specified. |
-l | Displays the output in long listing mode. |
-m | Displays the path utilization report. The -m flag is mutually exclusive with the -t flag. |
-p | Displays the tape utilization report. The -p flag is
mutually exclusive with the -d flag unless you specify the -a or -s flag,
too. Note: Only the Atape device utilization is reported.
|
-P | Displays the POSIX asynchronous IO utilization report, and turns off the display of TTY utilization report. |
-q | Specifies AIO queues and their request counts. The -q flag can be specified only with -A or -P flag. |
-Q | Displays a list of all the mounted file systems and the associated queue numbers with their request counts. The -Q flag can be specified only with -A or -P flag. |
-R | Specifies that the reset of min* and max* values should happen at each interval. The default is to reset the values once when iostat is started. The -R flag can be specified only with the -D flag. |
-s | Specifies the system throughput report. You can specify the -a flag with the -A flag, but not when you have specified the -q or -Q flag. Inside a workload partition, you can specify the -s flag only with the -f or -F flag. |
-S power | Displays the processor statistics that are multiplied by a
value of 10power. The default value of the power parameter
is 0. The following fields are scaled:
Note: By default, the %user, %sys, %idle,
and %iowait fields are relative to the processor
consumption of a WPAR.
When you specify the -S flag with a nonzero power, the %user, %sys, %idle,
and %iowait fields are relative to system-wide processor
consumption.
Note: The value of power can only be between
0 and 3.
|
-t | Turns off the display of disk utilization report. The -t and -d flags together turn off both disks and TTY or CPU statistics, allowed only with the -a or -s flags. The -t flag is mutually exclusive with the -d flag unless you specify the -a or -s flag, too. The -t flag is mutually exclusive with the -D flag unless you specify the -a or -s flag, too. The -t flag is mutually exclusive with the -m flag. |
-T | Displays the time stamp. |
-V | Displays valid nonzero statistics. |
-z | Resets the disk input/output statistics. Only root users can use this option. |
-@ | Reports I/O activities of a workload partition:
The -@ flag can be specified only with –d and –D, -f or -F flags. All possible combinations of the -s, -T, -f, -F, -d, -D and -l flags are allowed. Restriction: The -@ flag is mutually exclusive with -a, -t, -z, -A, -P, -q, -Q, and the -m flag. |
-X | Generates the XML output. The default file name is iostat_DDMMYYHHMM.xml unless you specify a different file name by using the –o option. |
-o | Specifies the file name for the XML output. |
iostat
iostat -d disk1 2
iostat disk1 2 6
iostat -d 2 6
iostat disk1 disk2 disk3 2 6
iostat -s
iostat -a 5
iostat -sat 20 10
iostat -sad hdisk0 hdisk7 30
iostat -T 60
iostat -A 2 6
iostat -A -Q
iostat -D
iostat -Dp
iostat –D hdisk0
iostat –z
iostat –F -@ ALL
iostat -f -s -@ ALL
iostat –f
iostat –s -f
iostat hdisk0 hdisk1 –f /dev/fslv00 /dev/fslv01 /dev/fslv02
iostat -S 1
Item | Description |
---|---|
/usr/bin/iostat | Contains the iostat command. |