Forum Discussion

Omer_69115's avatar
Omer_69115
Icon for Nimbostratus rankNimbostratus
Oct 19, 2010

Getting CPU Util with TOP command equal to tmstat

just running the command

top -n 1 | grep tmm | awk 'BEGIN{sum=0};{print sum+=$9}' | tail -1

 

 

 

and it is the same as tmstat

 

1 Reply

  • Hi Omer,

    Do you have a question about this? top in 9.4+ seems to show higher CPU usage than tmstat (or an SNMP OID for CPU usage). I've asked why this is and will try to report back if I find anything useful.

    
     top -n1
    top - 14:01:08 up 4 days, 17:26,  1 user,  load average: 0.54, 0.42, 0.43
    Tasks: 208 total,   2 running, 205 sleeping,   0 stopped,   1 zombie
    Cpu(s):  6.0%us,  2.6%sy,  0.0%ni, 91.3%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
    Mem:   8187068k total,  7198380k used,   988688k free,   285984k buffers
    Swap:  1048312k total,        0k used,  1048312k free,  1205724k cached
    
      PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
    10557 root      RT   0 1274m  28m  23m S  7.8  0.4   3:53.55 tmm
    10554 root      RT   0 1274m  28m  23m S  5.9  0.4   4:21.62 tmm
    10555 root      RT   0 1274m  28m  23m S  5.9  0.4   3:55.98 tmm
    10556 root      RT   0 1274m  28m  23m S  5.9  0.4   3:57.16 tmm
    
    =================================================================================================================
    
     snmpwalk -v2c -c public localhost sysGlobalTmmStatTmUsageRatio5s
    F5-BIGIP-SYSTEM-MIB::sysGlobalTmmStatTmUsageRatio5s.0 = Gauge32: 3
    
    =================================================================================================================
    
     CPU:   3% busy     1% idle   95% sleep                                                  Tue Oct 19 14:00:52 2010
    
           Memory Allocated                                                        Packets              54,610 Polls
       27,956,840 / 1,222,639,616                                           New Flows   Old Flows
      [  .  :  .  |  .  :  .  ]                                                     0           0
    
     Memory Count Object
    
      103MB   2-- (total)
       41MB    -- mco db (variable)
        6MB    -- ifnet (variable)
        6MB    -- tcl (variable)
    

    Aaron