To determine where input/output bottlenecks exists on a system the iostat command can be used to display the amount of data moving between the system and a disk or terminal device, on all but the IRIX operating system. The command osview is used in IRIX to duplicate this funtion. It is important to spread the data accesses evenly among the disks. In the example below the load on drive sd1 is 3 to 4 times that of the other disk devices.
Also, the command iostat -D is used to display the read and writes per second for each disk and the disk utilization.#iostat 5 tty fd0 sd1 sd2 sd3 cpu tin tout Kps tps serv Kps tps serv Kps tps serv Kps tps serv us sy wt id 0 5 0 0 0 744 22 76 9 1 54 5 1 75 29 31 4 36 0 16 0 0 0 352 16 42 0 0 0 0 0 0 40 54 5 0 0 16 0 0 0 1827 42 91 2 0 24 27 4 107 40 21 3 37 0 16 0 0 0 1883 45 86 0 0 0 0 0 0 36 19 5 40
The Solaris iostat command allows extend information to be displayed.#iostat -D 5 fd0 sd1 sd2 sd3 rps wps util rps wps util rps wps util rps wps util 0 0 0.0 8 14 34.7 1 0 1.5 0 0 1.2 0 0 0.0 19 11 46.1 1 2 4.8 1 7 11.1 0 0 0.0 0 3 3.0 2 0 1.9 0 0 0.0
The most interesting column is the svc_t. This is the average time, in milliseconds, the disk responds to service requests.#iostat -x extended disk statistics disk r/s w/s Kr/s Kw/s wait actv svc_t %w %b fd0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0 0 sd1 7.8 14.5 223.9 399.7 0.0 2.0 90.7 0 35 sd2 0.7 0.4 13.9 4.0 0.0 0.0 37.8 0 1 sd3 0.4 0.5 2.5 3.8 0.0 0.1 58.1 0 1 sd6 0.0 0.0 0.0 0.0 0.0 0.0 65.8 0 0 sd8 0.3 0.2 9.4 9.6 0.0 0.0 38.6 0 1 sd9 0.7 1.3 12.4 21.3 0.0 0.0 15.2 0 3
The HP-UX iostat does not follow these conventions. Review the sample output below.
Where device is the disk drive name, bps is the number of kilobytes transferred per second, sps indicates the number of disk seeks per second, and msps is the average time, in milliseconds, for a disk seek.$ iostat 5 device bps sps msps c0t6d0 0 0.0 1.0 c0t0d0 0 0.0 1.0 c0t1d0 0 0.0 1.0
Please review the man page for more information on iostat command options and display output for the following systems.
Terms used: disk drive.