vmstat

1) vmstat memory statistics

Look at this output, vmstat -s show a vast different statistics like total memory, used memory, active, inactive, buffer, cache, and used swap

vmstat -s   
    148314816  total memory
    147470240  used memory
      8614288  active memory
     47860660  inactive memory
       844584  free memory
       969132  buffer memory
     53375364  swap cache
     33554424  total swap
       302252  used swap
     33252172  free swap
     

       5852166 non-nice user cpu ticks
        142413 nice user cpu ticks
       2424658 system cpu ticks
   2703421205 idle cpu ticks
      7171442 IO-wait cpu ticks
        41696 IRQ cpu ticks
       302581 softirq cpu ticks
            0 stolen cpu ticks
   2064264043 pages paged in
    421654491 pages paged out
         3084 pages swapped in
        76986 pages swapped out
  

   1996249277 interrupts
   4113910706 CPU context switches
   1329115094 boot time
      2392692 forks



vmstat -m
Cache                     Num  Total     Size    Page
acfs_dio_flags_cache          0      0     32    112
acfs_dlm_lock_cache       49744  49780    200     19
acfs_ofsioerr_cache           0      0    152     25
acfs_ofsiocb_cache            0      0     48     77
acfs_metadata_buffer_cache  97536  97536    512      8
acfs_ofsbuf_cache         97536  97545    184     21
acfs_inode_cache          49724  49731   1264      3
acfs_reqd_fcb_cache           2     48     80     48
acfs_ccb_cache               16     30    128     30
acfs_fcb_cache                2      6    640      6
fio                           0      0     24    144
AsmAgePage                    0      0     40     92
AsmPhysIo                     0      0    112     34
AsmVolIo                      0      0    232     17 

etc..

The Kernel has a series of slab to hold its data structure.  The slabs (cache) shows how many elements are being used.  Num:  How many elements are being used, Total:  How many are allocated, Size:  number of memory pages.

2) vmstat disk I/O statistics --vmstat can provide a system view of I/O performance. 

vmstat 1 4
procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu------
 r  b   swpd   free   buff  cache   si   so    bi     bo   in   cs us sy id wa st
 1  0 302236 861800 969752 53349260    0    0  60800   159  1155 9874  0  0 100  4  0
 1  0 302236 861800 969752 53349268    0    0  67200   310  1111 10863  0  0 99  2  0
 1  0 302236 861800 969752 53349268    0    0  59200   107  1099 9405  0  0 100  1  0
 1  0 302236 856076 969752 53349272    0    0  62400   133  1117 9657  1  0 99  1 0



bi:   number of blocks read from the disk.  The block size for a disk is typically 1024bytes
bo:  number of blocks write to disk.  The block size is typically 1024 bytes
wa:  The amount of time CPU spent waintg for I/O to complete.  The rate is disk block written per second

In the example above, the system reads 60800 disk blocks (1024 bytes).  This means that the system is reading in data is about 60MB per second during this sample.  The CPU waits on I/0 4 percent of the time.


vmstat -D           71 disks
           29 partitions
     90818537 total reads
      2900185 merged reads
   5426679026 read sectors
    120504753 milli reading
   

    144456650 writes
     16105032 merged writes
   1687392852 written sectors
   1232357805 milli writing
            0 inprogress IO
       226541 milli spent IO


When reading and writing to a disk, the kernel tries to merge requests for contigous regions on the disk.  2900185 were meged reads, 90818537 reads are issued to the drives, 5426679026 sectors have been read from disk, and 120504753 mili seconds (120 seconds) were spent reading from the disk since system boot.


vmstat -d 1 3

disk- ------------reads------------ ------------writes----------- -----IO------
       total merged sectors      ms  total merged sectors      ms    cur    sec
emcpowera   9476   2693    5724210   55363      0      0       0       0      0     14
emcpowerb  29486   4220    6815324   61455 1288782      0 3112128 7023136      0   6927
emcpowerc  57535   4174    7014391   99188 1291223      0 3172102 14020711      0  13535
emcpowerd 3795550 552766   388914327 4921817 1177606  48984 17942221 2111148      0   6241
emcpowere 14760474 581148 742165368 11603546 1933882  41801 48088739 8770571      0  18854
emcpowerf 14359569 595222 728772130 11389615 2301733  60049 59774150 12806596      0  22546
emcpowerg 3254663 513761   371025152 7328476 922033  49739 15344356 2901035      0   8598
emcpowerh  25819   3261    5224637  119213 786387  58129 38398097 1708434      0   1502
emcpoweri  44771   1919    5728594   85739 1296732      0 3176960 7026615      0   7006



vmstat -p emcpowera1 1 3
emcpowera1    reads   read sectors  writes    requested writes
                       9286    5715751          300          2950
                       9386    5715751          349          3450
                       9486    5715751          349          3450

About 100 reads (9386-9286) and 49 writes have been issued to partition emcpowera1.  This can be useful to determine withich partion of a disk is seeing the most usage.

No comments:

Post a Comment