Iostat Primer

Harddisk
iostat
(input/output statistics) is a computer operating system monitoring tool used to collect and show storage input and output statistics. ( I stole this from Wiki)

It is often used to identify performance issues with local disks or networked file systems such as NFS.

For local disks and SAN disks I usually run it like so.

iostat -zxnM 5

this returns stats in the format below:

                    extended device statistics
    r/s    w/s   Mr/s   Mw/s wait actv wsvc_t asvc_t  %w  %b device
    1.3    2.9    0.0    0.0  0.0  0.0    2.1   10.1   1   2 d0
    0.0    0.0    0.0    0.0  0.0  0.0    0.4    8.8   0   0 d1
    0.4    0.2    0.0    0.0  0.0  0.0    2.6    8.6   0   0 d4
    0.7    2.9    0.0    0.0  0.0  0.0    0.0   10.2   0   2 d10
    0.0    0.0    0.0    0.0  0.0  0.0    0.0    8.1   0   0 d11
    0.2    0.2    0.0    0.0  0.0  0.0    0.0    9.3   0   0 d14
    0.7    2.9    0.0    0.0  0.0  0.0    0.0    7.2   0   2 d20
    0.0    0.0    0.0    0.0  0.0  0.0    0.0    7.7   0   0 d21
    0.2    0.2    0.0    0.0  0.0  0.0    0.0    7.8   0   0 d24
    0.0    0.0    0.0    0.0  0.0  0.0    0.0   62.3   0   0 c0t0d0
    1.0    4.5    0.0    0.0  0.0  0.1    0.0   11.0   0   3 c1t0d0
    1.0    3.1    0.0    0.0  0.0  0.0    0.0    6.9   0   2 c1t1d0
    0.2    0.0    0.0    0.0  0.0  0.0    0.0    0.0   0   0 c1t2d0
    0.2    0.0    0.0    0.0  0.0  0.0    0.0    0.0   0   0 c1t3d0
    2.4    1.0    0.3    0.0  0.0  0.0    0.1    4.2   0   1 c7t600A0B800029A7A000000E4247DAAF20d0
    0.2    0.2    0.0    0.0  0.0  0.0    0.0    3.4   0   0 c7t600A0B800029A7A000000E8447DFA700d0
    0.3    0.3    0.0    0.0  0.0  0.0    0.0    3.7   0   0 c7t600A0B800029A76800000C444820020Dd0
    0.9    0.8    0.1    0.0  0.0  0.0    0.0    2.9   0   0 c7t600A0B800029A76800000C4548200237d0

Use the key below to figure out what each heading means.

 The fields have the following meanings:

disk name of the disk
r/s reads per second
w/s writes per second
Kr/s kilobytes read per second
Kw/s kilobytes written per second
wait average number of transactions waiting for service (Q length)
 actv average number of transactions actively 
 being serviced (removed from the
 	 queue but not yet
completed)
%w percent of time there are transactions waiting
for service (queue non-empty)
%b percent of time the disk is busy (transactions
in progress)

Most of the time I am troubleshooting hot application mount points, which are usually SAN disks controlled by Veritas. So at this point you need to correspond the OS's long ass disk name with Veritas' short and clean name. Use vxdisk list

vxdisk -e list

SUN6140-0_0  auto      disk disgroup online     c7t600A0B800029A7A000000E8447DFA700d0s2
SUN6140-0_2  auto      disk disgroup online     c7t600A0B800029A76800000C4548200237d0s2
SUN6140-0_3  auto      disk disgroup online     c7t600A0B800029A76800000C444820020Dd0s2

At this point know Solaris' name for each disk and can look for hotspots on these disks.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s