Convert CHM data to more human readable format – like vmstat reports

  • Convert CHM SYSTEM metrics script : print_sys         BETA release – needs more testing !
  • Usage : ./print_sys.sh grac41_CHMOS
  • For add. comments read the script header section
Display Data without any rule violation for CPU and Memory 
%  ~/print_sys.sh grac41_CHMOS | egrep '#pcpus|cpuq:|03-22-14 09.53'
#pcpus: 2   #vcpus: 2   cpuht: N   chipname: Intel(R)  swaptotal: 5210108  physmemtotal: 4354292 #sysfdlimit: 6815744 #disks: 27 #nics: 6  
                   cpu:  cpuq: memfree:  mcache:  swapfree:  ior:  iow:  ios: swpin:  swpout: pgin: pgout: netr: netw: procs: rtprocs:  #fds: nicErrors:  
03-22-14 09.53.00  39.84   1   2142564    784832   3489400    485   151   111     63       0   350     81    67    48    362       14  19360     0 
03-22-14 09.53.05  19.97   1   2125460    800224   3489440   5944   281   205      6       0  2996    151    58    56    361       14  19424     0 
03-22-14 09.53.10  14.86   1   2093252    828660   3490000  11759  1105   391    235       0  5887    558    31    43    362       14  19968     0 
03-22-14 09.53.15  24.85   1   2084640    841416   3490508   5107   376   224    124       0  2595    198   101    70    362       14  19360     0 
03-22-14 09.53.20  14.82   1   2069372    843968   3490660   1079   884   197     57       0   571    452    40    46    360       14  19360     0 
03-22-14 09.53.25   24.7   1   2022044    858056   3491652   6413    66   542    560       0  3224     38    99    80    362       14  19456     0 
03-22-14 09.53.30  48.64   6   2011028    861608   3493348   2439   264   515    905       0  1249    144    91    76    363       14  19488     0 
03-22-14 09.53.35  23.79   2   1983380    864888   3495064   2869   211   607   1089       0  1451    117    72    99    364       14  19552     0 
03-22-14 09.53.40  14.41   2   2043312    868672   3495796   2533  1012   511    574       0  1371    514   101    63    371       14  19360     0 
03-22-14 09.53.45  19.47   1   2035188    873604   3496228   2690   973   306    396       0  1365    498    38    45    362       14  19392     0 
03-22-14 09.53.50  13.45   2   2019148    878448   3498648   4452   295   827   1423       0  2246    162    89    68    362       14  19424     0 
03-22-14 09.53.55  16.79   5   2002596    884416   3502788   4658   560   170   1940       0  2366    288    68    73    363       14  19456     0 

Display Data with  rule violation for CPU and Memory ( scroll right to see rule violations for CPU and Memory ) 
%   ~/print_sys.sh grac41_CHMOS | egrep '#pcpus|cpuq:|03-22-14 10.03'
#pcpus: 2   #vcpus: 2   cpuht: N   chipname: Intel(R)  swaptotal: 5210108  physmemtotal: 4354292 #sysfdlimit: 6815744 #disks: 27 #nics: 6  
                   cpu:  cpuq: memfree:  mcache:  swapfree:  ior:  iow:  ios: swpin:  swpout: pgin: pgout: netr: netw: procs: rtprocs:  #fds: nicErrors:  
03-22-14 10.03.00  11.74   1     93960    171796    172100   6049  3475   286   1899    1593  3033   1650    14    10    379       15  19584     0  MEMLOW < 10%
03-22-14 10.03.05   7.52   1    103496    172052    167384   6020  3678   129   1292    1524  3006   1580    24    10    384       15  19584     0  MEMLOW < 10%
03-22-14 10.03.10   6.60   2    113480    173020    188364   4170  1933   669   1078     960  2030    996    18     9    388       15  19488     0  MEMLOW < 10%
03-22-14 10.03.15   7.24   1    109800    173584    181808   6279  3576   190   1495    1655  3189   1679    27    17    381       15  19520     0  MEMLOW < 10%
03-22-14 10.03.20  24.20  61     85236    173572    195528   4258  2247   789   1174    1135  2088   1172    48    11    394       15  19456     0  MEMLOW < 10%
03-22-14 10.03.25  19.96  64     87344    166056    138244    255 11165   113     69    5647    98   5650    19     4    394       15  19456     0  MEMLOW < 10%
03-22-14 10.03.30  100.0  17     89932    164992    129100 35716 475205 126771 31478  472380 35716  472380  823   885    394       15  19456     0  CPU > 90%  MEMLOW < 10%
03-22-14 10.03.35  12.18   1     87380    168188    120572   4599  5959   278   1435    2051  2234   2175    49     9    379       15  19392     0  MEMLOW < 10%
03-22-14 10.03.40   6.85   1     86364    172672    113828   4973  3378   129   1288    1649  2490   1791    15     4    390       15  19456     0  MEMLOW < 10%
03-22-14 10.03.45   5.22   1     86804    175592    112524   2504  1439   352    523     364  1314    452    15    14    392       15  19456     0  MEMLOW < 10%
03-22-14 10.03.50   6.89   1     86768    175572    105128   4016  3705    93    836    1697  1908   1791     8     3    391       15  19488     0  MEMLOW < 10%
03-22-14 10.03.55   51.5 124     69692    171176     18184    956 35388   311    213   17409   416  17555    13     8    393       15  19488     0  MEMLOW < 10%

 

Leave a Reply

Your email address will not be published. Required fields are marked *