Linux Scroll

Just another WordPress.com site

iostat

iostat – report I/O statistics
/usr/bin/iostat [ -cdDItx ] [ -l n ] [ disk … ]

# iostat -Ee

           ---- errors ---

device    s/w h/w trn tot
md100     0   0   0   0
md101     0   0   0   0
ramdisk1  0   0   0   0
sd0       0   0   0   0
sd1       0   0   0   0
ssd0      1 139   6 146
ssd1      1 110  54 165

-e          Display device  error  summary  statistics.  The
            total  errors,  hard  errors,  soft  errors, and
            transport errors are displayed.

-E          Display all device error statistics.
# iostat -en

  ---- errors ---
  s/w h/w trn tot device
    0   0   0   0 md/d100
    0   0   0   0 md/d101
    0   0   0   0 ramdisk1
    0   0   0   0 c1t0d0
    0   0   0   0 c1t1d0
    3   0   0   3 c0t0d0

-e          Display device  error  summary  statistics.  The
            total  errors,  hard  errors,  soft  errors, and
            transport errors are displayed.

-n          Display names in descriptive format.  For  example,
            cXtYdZ, rmt/N, server:/export/path.

Only display error device with full info:

# iostat -En
-E          Display all device error statistics.
-n          Display names in descriptive format.  For  example,
            cXtYdZ, rmt/N, server:/export/path.

Using iostat to Generate User and System Operation Statistics

The option set -xcnCXTdz interval is particularly useful for determining  whether disk I/O problems exist and for identifying problems.

# iostat -xcnCXTdz 5

       Mon Nov 24 14:58:36 2003
          cpu
       us sy wt id
       14 31  0 20
                          extended device statistics
        r/s    w/s    kr/s      kw wait  actv wsvc_t asvc_t  %w  %b device
        3.8   29.9   145.8    44.0  0.0   0.2    0.1    6.4   0   5     c0
       666.3  814.8 12577.6 17591.1 91.3  82.3   61.6   55.6   0   2    c12
       180.0  234.6  4401.1  5712.6  0.0 147.7    0.0  356.3   0  98    d10

       Mon Nov 24 14:58:41 2003
          cpu
       us sy wt id
       11 31  0 22
                          extended device statistics
        r/s    w/s    kr/s      kw wait  actv wsvc_t asvc_t  %w  %b device
        0.8   41.0     5.2    20.5 0.0    0.2    0.2    4.4   0   6     c0
       565.3  581.7  8573.2 10458.9 0.0   26.6    0.0   23.2   0   3    c12
       106.5   81.3  3393.2  1948.6 0.0    5.7    0.0   30.1   0  99    d10

-x          Report extended  disk  statistics.
-c          Report the percentage of  time  the  system  has
            spent  in user mode, in system mode, waiting for
            I/O, and idling.
-n          Display names in descriptive format.
-C          When the -x  option  is  also  selected,  report
            extended  disk  statistics  aggregated  by  controller id.
-T u | d    Display a time stamp.
-d          For each disk, report the  number  of  kilobytes
            transferred  per second, the number of transfers
            per second, and the average service time in milliseconds.
-z          Do not print lines whose underlying data  values
            are all zeros.

Using iostat to Generate TTY Statistics

# iostat -x tc 5 2

                        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
       sd0    0.4  0.3 10.4   8.0  0.0  0.0  36.9  0   1    0   10   0  0  0 99
       sd1    0.0  0.0  0.3   0.4  0.0  0.0  35.0  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
       nfs2   0.0  0.0  0.0   0.1  0.0  0.0  35.6  0   0
                  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
       sd0    0.0  0.0  0.0   0.0  0.0  0.0  0.0   0   0   0  155   0  0  0 100
       sd1    0.0  0.0  0.0   0.0  0.0  0.0  0.0   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
       nfs2   0.0  0.0  0.0   0.0  0.0  0.0  0.0   0   0

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 (queue length)
actv      average number of transactions actively being serviced 
          (removed  from  the  queue but not yet completed)
svc_t     average response time  of  transactions,  in  milliseconds
%w        percent of time there are transactions waiting for service (queue non-empty)
%b        percent of time the disk is busy (transactions  in progress)

Using iostat  to  Generate  Partition  and  Device Statistics

# iostat -xnp

                      extended device statistics
       r/s  w/s  kr/s kw/s wait actv wsvc_t asvc_t %w %b device
       0.4  0.3  10.4  7.9  0.0  0.0    0.0   36.9  0  1 c0t0d0
       0.3  0.3   9.0  7.3  0.0  0.0    0.0   37.2  0  1 c0t0d0s0
       0.0  0.0   0.1  0.5  0.0  0.0    0.0   34.0  0  0 c0t0d0s1
       0.0  0.0   0.0  0.1  0.0  0.0    0.6   35.0  0  0 fuji:/export/home/user3
-x          Report extended  disk  statistics.
-n          Display names in descriptive format.  For  example,
            cXtYdZ, rmt/N, server:/export/path.
-P          For each disk, report  per-partition  statistics only, 
            no per-device statistics.

Show Translation from Instance Name to Descriptive Name

# iostat -xn sd1
                              extended device statistics
       r/s    w/s   kr/s   kw/s wait actv wsvc_t asvc_t  %w  %b device
       0.0    0.0    0.0    0.0  0.0  0.0    0.0    0.0   0   0 c8t1d0

-x          Report extended  disk  statistics.
-n          Display names in descriptive format.  For  example,
            cXtYdZ, rmt/N, server:/export/path.

Show Target Port and  Controller  Activity  for  a Specific Disk

# iostat -Y ssd22
                          extended device statistics
       device          r/s    w/s   kr/s   kw/s wait actv  svc_t  %w  %b
       ssd22           0.2    0.0    1.5    0.0  0.0  0.0    0.7   0   0
       ssd22.t2        0.2    0.0    1.5    0.0  0.0  0.0    0.0   0   0
       ssd22.t2.fp0    0.0    0.0    0.4    0.0  0.0  0.0    0.0   0   0
       ssd22.t2.fp1    0.0    0.0    0.4    0.0  0.0  0.0    0.0   0   0
       ssd22.t2.fp2    0.0    0.0    0.4    0.0  0.0  0.0    0.0   0   0
       ssd22.t2.fp3    0.0    0.0    0.4    0.0  0.0  0.0    0.0   0   0

-Y          For disks under scsi_vhci(7D) control, in  addition to disk lun 
            statistics, also report statistics for lun.targetport and 
            lun.targetport.controller.
Advertisements

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

%d bloggers like this: