Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Translate just one OID name to its number

Status
Not open for further replies.

private55

Technical User
Feb 15, 2013
2
GB
I have an FC switch which I try to monitor using SNMP:

snmpwalk -v2c -c public <IP ADDRESS>|wc -l
888

When I use MIB file I have a name of (almost) each line. For example:

snmpwalk -v2c -c public -m /usr/share/mibs/ietf/FIBRE-CHANNEL-FE-MIB <IP ADDRESS> | grep FIBRE-CHANNEL-FE-MIB::fcFxPortC2InFrames.1.10
FIBRE-CHANNEL-FE-MIB::fcFxPortC2InFrames.1.10 = Counter32: 0

But how do I know which numeric OID is it ? I'd like to avoid counting lines ...

Regards


 
You are wanting the OID as in 1.3.6.1..... or something else? My apologies but I am unclear.

Bill
 
Exactly that.
In other word: having named OID (using MIB file) how can I translate that to numeric OID without counting lines ?
 
Well you could look at the raw data packet. Do a getone on that single object and look for the OID in the varbind.

There may also be some option in netsnmp's snmpwalk to not resolve the OID to name.

Bill
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top