How can we query the CPU usage of the data plane using SNMP

Publication Date:  2014-10-01 Views:  407 Downloads:  0
Issue Description
Hello,

I know that SNMP is not the newest deal in our branch but sometimes new OIDs appear that makes the life of every network administrator easier.

In one of my recent cases I found one of them that I think would be helpful in a lot of situations : the possibility to query the cpu usage of the control and data plane
Unfortunately, in V2R3, there is no way to query the cpu usage of the data plane but starting from V2R5  a new mib info  has been introduced :hwCpuDevTable (The OID prefix of this table is 1.3.6.1.4.1.2011.6.3.4.1.)

You can find the whole description of this table in the MIB Reference of the V2R5 version but in the mean time I want to show you a small example of how it works.

Solution
Example:
In the following example, I generated some traffic on one of  the router’s interfaces while I displayed the cpu-usage on the device and query it by snmp

1.3.6.1.4.1.2011.6.3.4.1.2.0.0.1 // queries the average cpu-usage of the data plane
1.3.6.1.4.1.2011.6.3.4.1.3.0.0.1 //cpu-usage of the data plane within the latest 1 minutes
1.3.6.1.4.1.2011.6.3.4.1.4.0.0.1 //cpu-usage of the data plane within the latest 5 minutes.

As you can see the OIDs that end in 1 return the same result as the cpu-usage of the data plane
Output of the display cpu-usage command on the router:

Data    Plane                                                                 
    CPU Usage: 37.4%   Max: 76.9%                                             
    CPU utilization for ten seconds: 37.4%  one minute:  37.3%  five minutes:  57.5% .    
     


***** SNMP QUERY STARTED *****

2: hwCpuDevDuty.0.0.1 (integer) 37

4: hwAvgDuty1min.0.0.1 (integer) 37

6: hwAvgDuty5min.0.0.1 (integer) 57


***** SNMP QUERY FINISHED *****


   I hope this is helpful and some of you will use this on the future. Thank you!                                        
                                                                               

END