Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I want to fetch a device's cpu and memory status thought net-snmp. I get my device's info with this command:

snmpwalk -v 2c -c public 210.38.xxx.xxx system

And I got this info:

SNMPv2-MIB::sysDescr.0 = STRING: Ruijie High-density IPv6 10G Core Routing Switch(S8606) By Ruijie Network
SNMPv2-MIB::sysObjectID.0 = OID: SNMPv2-SMI::enterprises.4881.1.1.10.1.43
DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (1978814424) 229 days, 0:42:24.24
SNMPv2-MIB::sysContact.0 = STRING: 
SNMPv2-MIB::sysName.0 = STRING: S8606
SNMPv2-MIB::sysLocation.0 = STRING: 
SNMPv2-MIB::sysServices.0 = INTEGER: 7

Now I want to fetch the cpu status, and I search my question on Google, somebody offer a oid for query the cpu status:

snmpwalk -v 2c -c public 210.38.xxx.xxx usageOfCPU

But it doesn't worked :

No log handling enabled - using stderr logging
usageOfCPU: Unknown Object Identifier (Sub-id not found: (top) -> usageOfCPU)

Somebody told me some switch has its private MIB, and you can use it to see its CPU status, is that right?

I hope someone can solve me question......

share|improve this question
    
This is highly defendant on the device and what it exposes over snmp. Some implementations (Linux, for example) allows you to define your own OIDs. Which device are you asking about? –  toppledwagon Nov 1 '13 at 5:34
    
define my own OIDs? I can get some information such as its name, some port's flow but the cpu or the memory status....I want to search this device, a switch, Ruijie High-density IPv6 10G Core Routing Switch(S8606) By Ruijie. Someone told me I have to add the switch's private MIB.... help me PLZ... –  Paul Nov 1 '13 at 5:38
    
I don't know that device but it sounds like it may have more than one CPU. Also, don't expect to necessarily find the CPU usage in %, you could find the load or some other metric. But as the currently present answer suggests just take a look at the whole tree to see if something standard matches. In any case I'd take a look at the MIB from the manufacturer which certainly exposes more details than any standard MIB. –  Marki Nov 1 '13 at 16:41
add comment

1 Answer 1

up vote 0 down vote accepted

First, load the custom MIB(s) on your management station (the one you are using to query the device). You should follow this guide.

In short:

(1) obtain custom MIB(s) for your device from manufacturer
(2) put the following lines in snmp.conf file (e.g. /usr/local/share/snmp.conf) or in a personal file (e.g. $HOME/.snmp/snmp.conf):

mibs +ALL

Then, snmpwalk your device and examine what OIDs it responds to. Hopefully you will find the OID of interest in the list, if not, then contact the manufacturer to see if your particular device/model supports that particular OID.

snmpwalk -v 2c -c public 210.38.xxx.xxx

-- ab1

share|improve this answer
    
Thanks for your answer~ Now I am trying to obtain the custom MIBs from the different manufacturer ~ –  Paul Nov 17 '13 at 0:11
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.