bsnmp and HOST-RESOURCES-MIB
Mikolaj Golub
trociny at freebsd.org
Fri Jun 22 06:50:58 UTC 2012
On Thu, 21 Jun 2012 19:23:33 +0700 Eugene Grosbein wrote:
EG> Hi!
EG> bsnmpd(1) has /usr/lib/snmp_hostres.so module in base system
EG> for HOST-RESOURCES-MIB implementation. What should I do to make
EG> bsnmpwalk -v 2c -s comm at localhost 1.3.6.1.2.1.25.3.3.1.2
EG> work without complaining:
EG> bsnmpwalk: Invalid OID - 1.3.6.1.2.1.25.3.3.1.2
EG> OID parsing error - 1.3.6.1.2.1.25.3.3.1.2
EG> And without "-n" flag, please :-)
EG> I'd like it to resolve OIDs to their names.
I am not very familiar with bsnmptools. Experimenting, I have found such
combinations working:
in138:~% bsnmpwalk -v 1 -s public at localhost -i hostres_tree.def 'hrProcessorTable'
hrProcessorFrwID[5] = 0.0
hrProcessorFrwID[10] = 0.0
hrProcessorLoad[5] = 7
hrProcessorLoad[10] = 5
in138:~% bsnmpget -v 1 -s public at localhost -i hostres_tree.def 'hrProcessorLoad.5'
hrProcessorLoad[5] = 8
Note, you should explicitly specify hostres_tree.def (from /usr/share/snmp/defs)
for bsnmptools to be able to resolve name (no idea why).
Unfortunately, bsnmpwalk does not work for hrProcessorLoad:
in138:~% bsnmpwalk -v 1 -s public at localhost -i hostres_tree.def 'hrProcessorLoad'
bsnmpwalk: Snmp dialog - Operation timed out
Athough it works for the numerical format:
in138:~% bsnmpwalk -v 1 -s public at localhost '1.3.6.1.2.1.25.3.3.1.2'
1.3.6.1.2.1.25.3.3.1.2.5 = 10
1.3.6.1.2.1.25.3.3.1.2.10 = 10
in138:~% bsnmpwalk -v 1 -s public at localhost -i hostres_tree.def '1.3.6.1.2.1.25.3.3.1.2'
hrProcessorLoad[5] = 10
hrProcessorLoad[10] = 6
Also, no idea why.
--
Mikolaj Golub
More information about the freebsd-net
mailing list