System Administration Guide

How to Check Disk Activity (sar)

Display disk activity statistics with the sar -d command.


$ sar -d
SunOS venus 5.6 Generic sun4m    08/20/96
00:00:02 device %busy avque r+w/s blks/s avwait avserv
01:00:02 fd0        0   0.0     0      0    0.0    0.0
         sd1        0   0.0     0      0   19.6   35.4
         sd3        0   0.0     0      0   10.8   55.6

Table 64-10 describes the disk devices activities reported by the -d option. Note that queue lengths and wait times are measured when there is something in the queue. If %busy is small, large queues and service times probably represent the periodic efforts by the system to ensure that altered blocks are written to the disk in a timely fashion.

Table 64-10 Output from the sar -d Command

Field Name 

Description 

device

Name of the disk device being monitored 

%busy

Percentage of time the device spent servicing a transfer request 

avque

The sum of the average wait time plus the average service time 

r+w/s

Number of read and write transfers to the device per second 

blks/s

Number of 512-byte blocks transferred to the device per second 

avwait

Average time, in milliseconds, that transfer requests wait idly in the queue (measured only when the queue is occupied) 

avserv

Average time, in milliseconds, for a transfer request to be completed by the device (for disks, this includes seek, rotational latency, and data transfer times) 

Examples--Checking Disk Activity

These two examples illustrate the sar -d output. The first example is from a computer with a non-SCSI (Small Computer System Interface, pronounced "scuzzy") integral disk; that is, a disk that does not use a SCSI interface. This example illustrates data being transferred from a hard disk (hdsk-0) to the floppy disk (fdsk-0).


$ sar -d
SunOS venus 5.6 Generic sun4m    08/20/96
13:46:28  device %busy avque r+w/s blks/s  avwait  avserv
13:46:58  hdsk-0    6   1.6     3      5    13.8    23.7
          fdsk-0   93   2.1     2      4   467.8   444.0
13:47:28  hdsk-0   13   1.3     4      8    10.8    32.3
          fdsk-0  100   3.1     2      5   857.4   404.1
13:47:58  hdsk-0   17    .7     2     41      .6    48.1
          fdsk-0  100   4.4     2      6  1451.9   406.5
Average   hdsk-0   12   1.2     3     18     8.4    34.7
          fdsk-0   98   3.2     2      5   925.7   418.2

The following example is from a computer with SCSI integral disks; that is, disks that use a SCSI interface. The example illustrates data being transferred from one SCSI hard disk (sd00-0) to another SCSI integral disk (sd00-1).


$ sar -d
SunOS venus 5.6 Generic sun4m    08/20/96
14:16:24  device %busy avque r+w/s blks/s  avwait  avserv
14:16:52 sd00-0      2   1.0     1      3     0.0    17.9
         sd00-1      6   1.1     3      5     2.0    23.9
14:17:21 sd00-0      2   1.0     1      2     0.0    19.6
         sd00-1      6   1.1     3      5     0.2    24.3
14:17:48 sd00-0      3   1.0     1      3     0.3    18.3
         sd00-1      7   1.1     3      5     1.3    25.4
14:18:15 sd00-0      3   1.0     1      3     0.0    17.2
         sd00-1      5   1.0     2      5     0.0    21.6
Average  sd00-0      2   1.0     1      3     0.1    18.2
         sd00-1      6   1.0     3      5     0.9    23.0