cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
10262
Views
11
Helpful
6
Replies
Highlighted
Beginner

What is the OID to measure CPU usage via SNMP?

Hi,

I have a router 2612 IOS 12.3.6a. I need measure the CUP usage via SNMP buy I can't get the OID.

Any know what is this OID?

Thanks.

6 REPLIES 6
Highlighted
Beginner

Re: What is the OID to measure CPU usage via SNMP?

Try

cpu1min - 1.3.6.1.4.1.9.2.1.57.0

cpu5min - 1.3.6.1.4.1.9.2.1.58.0

Highlighted
Collaborator

Re: What is the OID to measure CPU usage via SNMP?

Both the above objects are from OLD-CISCO-SYS-MIB, which is a deprecated MIB. You need to use the cpmCPUTotal5minRev and cpmCPUTotal1minRev from CISCO-PROCESS-MIB instead

Highlighted
Beginner

Re: What is the OID to measure CPU usage via SNMP?

Hi,

I see that 1.3.6.1.4.1.9.9.109.1.1.1.1.8 is the OID for cpmCPUTotal5minRev. I use Getif to find this OID. If I browse in the Getif tree I reach this point.1.3.6.1.4.1., here the tree end.

How I can reach the 1.3.6.1.4.1.9.9.109.1.1.1.1.8 OID?

Thanks and regards.

Highlighted
Collaborator

Re: What is the OID to measure CPU usage via SNMP?

If you use getif and the tree ends, the MIBs are not known to the application. You have to compile the MIB into getif first before you can browse down the tree. Instead of compiling the mib you should also be able to directly enter the oid and start a get or getnext.

Look at http://www.wtcs.org/snmp4tpc/getif.htm

for how to compile mibs for getif.

regards,

martin

Highlighted
Beginner

Re: What is the OID to measure CPU usage via SNMP?

I make "sh snmp mib | include cpmCPUTotalTable"

cpmCPUTotalTable.1.2

cpmCPUTotalTable.1.3

cpmCPUTotalTable.1.4

cpmCPUTotalTable.1.5

cpmCPUTotalTable.1.6

cpmCPUTotalTable.1.7

cpmCPUTotalTable.1.8

This assure me that these OID exist.

When I try get these values using mrtg I get the following messages (MRTG error and router debug):

MRTG Error

SNMP Error:

Received SNMP response with error code

error status: noSuchName

index 1 (OID: 1.3.6.1.4.1.9.9.109.1.1.1.1.8)

SNMPv1_Session (remote host: "probe.com" [probe.com].161)

community: "public"

request ID: -605757729

PDU bufsize: 8000 bytes

timeout: 2s

retries: 5

backoff: 1)

at C:/mrtg-2.9.27/bin\..\lib\mrtg2/SNMP_util.pm line 458

SNMPGET Problem for 1.3.6.1.4.1.9.9.109.1.1.1.1.8 1.3.6.1.4.1.9.9.109.1.1.1.1.7

sysUptime sysName on public@probe.com

at mrtg line 1670

WARNING: skipping because at least the query for 1.3.6.1.4.1.9.9.109.1.1.1.1.8 o

n probe.com did not succeed

ERROR: Target[probe.com][_IN_] ' $$target[0]{$mode} ' did not eval into defin

ed data

ERROR: Target[probe.com]

[_OUT_] ' $$target[0]{$mode} ' did not eval into defi

ned data

WARNING: Skipping Update of probe.com, inlast is not defined

WARNING: Skipping Update of probe.com, outlast is not defined

Router Debug

Jul 2 17:34:38.441: SNMP: Packet received via UDP from pcmanagment.com on TokenRing0/0

Jul 2 17:34:38.445: SNMP: Get request, reqid -605757729, errstat 0, erridx 0

cpmCPUTotalTable.1.8 = NULL TYPE/VALUE

cpmCPUTotalTable.1.7 = NULL TYPE/VALUE

sysUpTime.0 = NULL TYPE/VALUE

system.5.0 = NULL TYPE/VALUE

Jul 2 17:34:38.521: SNMP: Response, reqid -605757729, errstat 2, erridx 1

cpmCPUTotalTable.1.8 = NULL TYPE/VALUE

cpmCPUTotalTable.1.7 = NULL TYPE/VALUE

sysUpTime.0 = NULL TYPE/VALUE

system.5.0 = NULL TYPE/VALUE

Jul 2 17:34:38.686: SNMP: Packet sent via UDP to pcmanagment.com

What is the problem? Why I get NULL TYPE/VALUE? What do means "errstat 2 and erridx 1"?

Could you help me? or Where I can get help?

Note: I change the community and the SNMP manager (pcmanagemnt.com) and agent (probe.com) for security reason.

Thanks and regards.

Contributor

Hi @rmushtaq  

Hi rmushtaq  

thanks... it wrked for me on Router 3945 running IOS v15.5(3) M5.

+5 Cheers.

regards,

Ritesh Desai.

CreatePlease to create content