System Administration Guide

Displaying Disk Utilization Information

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

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


$ iostat 5
      tty     fd0     sd1     sd3     cpu
tin tout Kps tps serv Kps tps serv Kps tps serv us sy wt id
  0    0   0   0    0   1   0   79   0   0   58  0  1  0 99

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).

Table 64-4 describes the fields in the iostat command output.

Table 64-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          fd0           sd3       cpu
 tin tout bps tps serv  bps tps serv  us sy wt  id
   0    1   0   0    0    1   0 5640   0  1  0  98
   0   10   0   0    0    0   0    0   0  1  0  99
   0   10   0   0    0    0   0    0   0  1  0  99
   0   10   0   0    0   27   3  319   0  4  9  88
   0   10   0   0    0    2   0 5061   0  0  0  99
   0   10   0   0    0    0   0    0   0  0  0 100
   0   10   0   0    0    0   0    0   0  0  0 100
   0   10   0   0    0    0   0    0   0  0  0 100
   0   10   0   0    0    0   0    0   0  0  0 100
 

How to Display Extended Disk Statistics

Run iostat -xtc to get extended disk statistics.


$ iostat -xtc
               extended disk statistics               tty          cpu
disk  r/s w/s Kr/s Kw/s wait actv  svc_t  %w %b  tin tout us sy  wt id
sd0   0.2 1.7  1.0  9.7  0.0  0.1   39.8   0  3   0   9   1  6   9  85
sd1   0.5 2.5 10.6 21.0  0.0  0.1   26.6   0  5      
sd2   0.0 0.2  0.1  0.0  0.0  0.0  157.7   0  0

This command displays a line of output for each disk. The output fields are described in Table 64-5.

Table 64-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