System Administration Guide, Volume 2

Displaying Disk Utilization Information (iostat n)

Use the iostat command to report statistics about disk input and output, and produces measures of throughput, utilization, queue lengths, transaction rates, and service time. For a detailed description of this command, refer to iostat(1M).

How to Display Disk Utilization Information (iostat)

You can display disk activity information by using the iostat command with a time interval.


$ iostat 5
     tty          fd0           sd3          nfs1         nfs31          cpu
tin tout kps tps serv  kps tps serv  kps tps serv  kps tps serv  us sy wt id
  0    1   0   0  410    3   0   29    0   0    9    3   0   47   4  2  0 94

The first line of output shows the statistics since the last boot. Each subsequent line shows the interval statistics. The default is to show statistics for the terminal (tty), disks (fd and sd), and CPU (cpu).

The table below describes the fields in the iostat command output.

Table 36-4 Output From the iostat n Command

For Each ... 

Field Name 

Description 

Terminal  

 

 

 

tin

Number of characters in the terminal input queue 

 

tout

Number of characters in the terminal output queue 

Disk  

 

 

 

bps

Blocks per second 

 

tps

Transactions per second 

 

serv

Average service time, in milliseconds 

CPU  

 

 

 

us

In user mode 

 

sy

In system mode 

 

wt

Waiting for I/O 

 

id

Idle 

Example--Displaying Disk Utilization Information

The following example shows disk statistics gathered every five seconds.


$ iostat 5
tty        sd0           sd6           nfs1         nfs49           cpu
tin tout kps tps serv  kps tps serv  kps tps serv  kps tps serv  us sy wt id
 0    0   1   0   49    0   0    0    0   0    0    0   0   15   0  0  0 100
 0   47   0   0    0    0   0    0    0   0    0    0   0    0   0  0  0 100
 0   16   0   0    0    0   0    0    0   0    0    0   0    0   0  0  0 100
 0   16   0   0    0    0   0    0    0   0    0    0   0    0   0  0  0 100
 0   16  44   6  132    0   0    0    0   0    0    0   0    0   0  0  1 99
 0   16   0   0    0    0   0    0    0   0    0    0   0    0   0  0  0 100
 0   16   0   0    0    0   0    0    0   0    0    0   0    0   0  0  0 100
 0   16   0   0    0    0   0    0    0   0    0    0   0    0   0  0  0 100
 0   16   0   0    0    0   0    0    0   0    0    0   0    0   0  0  0 100
 0   16   0   0    0    0   0    0    0   0    0    0   0    0   0  0  0 100
 0   16   3   1   23    0   0    0    0   0    0    0   0    0   0  0  1 99
 0   16   0   0    0    0   0    0    0   0    0    0   0    0   0  0  0 100
 0   16   0   0    0    0   0    0    0   0    0    0   0    0   0  0  0 100
 0   16   0   0    0    0   0    0    0   0    0    0   0    0   0  0  0 100

How to Display Extended Disk Statistics (iostat -xtc)

Run iostat -xtc to get extended disk statistics.


$ iostat -xtc
                  extended device statistics                      tty         cpu
device       r/s    w/s   kr/s   kw/s wait actv  svc_t  %w  %b  tin tout  us sy wt id
fd0          0.0    0.0    0.0    0.0  0.0  0.0    0.0   0   0    0    0   0  0  0 100
sd0          0.0    0.0    0.4    0.4  0.0  0.0   49.5   0   0 
sd6          0.0    0.0    0.0    0.0  0.0  0.0    0.0   0   0 
nfs1         0.0    0.0    0.0    0.0  0.0  0.0    0.0   0   0 
nfs49        0.0    0.0    0.0    0.0  0.0  0.0   15.1   0   0 
nfs53        0.0    0.0    0.4    0.0  0.0  0.0   24.5   0   0 
nfs54        0.0    0.0    0.0    0.0  0.0  0.0    6.3   0   0 
nfs55        0.0    0.0    0.0    0.0  0.0  0.0    4.9   0   0 

This command displays a line of output for each disk. The output fields are described in the table below.

Table 36-5 Output From the iostat -xtc Command

Field Name 

Description 

r/s

Reads per second 

w/s

Writes per second 

Kr/s

Kbytes read per second 

Kw/s

Kbytes written per second 

wait

Average number of transactions waiting for service (queue length) 

actv

Average number of transactions actively being serviced 

svc_t

Average service time, in milliseconds 

%w

Percentage of time the queue is not empty 

%b

Percentage of time the disk is busy