HOWTO Use SnmpTranslate command

HOWTO Use SnmpTranslate command

1.- Use of SNMPTANSLATE: In a general way

wmunguiam@server:~$ snmptranslate -On -IR sysDescr
.1.3.6.1.2.1.1.1

wmunguiam@server:~$ snmptranslate -Onf -IR sysDescr
.iso.org.dod.internet.mgmt.mib-2.system.sysDescr

wmunguiam@server:~$ snmptranslate -Tl | head
.iso(1).org(3)
.iso(1).org(3).dod(6)
.iso(1).org(3).dod(6).internet(1)
.iso(1).org(3).dod(6).internet(1).directory(1)
.iso(1).org(3).dod(6).internet(1).mgmt(2)
.iso(1).org(3).dod(6).internet(1).mgmt(2).mib-2(1)
.iso(1).org(3).dod(6).internet(1).mgmt(2).mib-2(1).system(1)
.iso(1).org(3).dod(6).internet(1).mgmt(2).mib-2(1).system(1).sysDescr(1)
.iso(1).org(3).dod(6).internet(1).mgmt(2).mib-2(1).system(1).sysObjectID(2)
.iso(1).org(3).dod(6).internet(1).mgmt(2).mib-2(1).system(1).sysUpTime(3)

wmunguiam@server:~$ snmptranslate -To | head
.1.3
.1.3.6
.1.3.6.1
.1.3.6.1.1
.1.3.6.1.2
.1.3.6.1.2.1
.1.3.6.1.2.1.1
.1.3.6.1.2.1.1.1
.1.3.6.1.2.1.1.2
.1.3.6.1.2.1.1.3

wmunguiam@server:~$ snmptranslate -Ts | head
.iso.org
.iso.org.dod
.iso.org.dod.internet
.iso.org.dod.internet.directory
.iso.org.dod.internet.mgmt
.iso.org.dod.internet.mgmt.mib-2
.iso.org.dod.internet.mgmt.mib-2.system
.iso.org.dod.internet.mgmt.mib-2.system.sysDescr
.iso.org.dod.internet.mgmt.mib-2.system.sysObjectID
.iso.org.dod.internet.mgmt.mib-2.system.sysUpTime

2.- Use of SNMPTANSLATE: Focus in specific Object

wmunguiam@server:~$ locate NET-SNMP
...
/usr/share/snmp/mibs/NET-SNMP-AGENT-MIB.txt
/usr/share/snmp/mibs/NET-SNMP-EXAMPLES-MIB.txt
/usr/share/snmp/mibs/NET-SNMP-EXTEND-MIB.txt
/usr/share/snmp/mibs/NET-SNMP-MIB.txt
/usr/share/snmp/mibs/NET-SNMP-TC.txt
/usr/share/snmp/mibs/NET-SNMP-VACM-MIB.txt

wmunguiam@server:~$ cd /usr/share/snmp/mibs/
wmunguiam@server:/usr/share/snmp/mibs$ snmptranslate -M+. -mNET-SNMP-MIB -Tp -IR netSnmp

+--netSnmp(8072)
|
+--netSnmpObjects(1)
|
+--netSnmpEnumerations(3)
| |
| +--netSnmpModuleIDs(1)
| |
| +--netSnmpAgentOIDs(2)
| |
| +--netSnmpDomains(3)
|
+--netSnmpNotificationPrefix(4)
| |
| +--netSnmpNotifications(0)
| |
| +--netSnmpNotificationObjects(1)
|
+--netSnmpConformance(5)
| |
| +--netSnmpCompliances(1)
| |
| +--netSnmpGroups(2)
|
+--netSnmpExperimental(9999)
|
+--netSnmpPlaypen(9999)






Comments