Date: Fri, 22 Jun 2012 09:50:46 +0300 From: Mikolaj Golub <trociny@freebsd.org> To: Eugene Grosbein <eugen@grosbein.pp.ru> Cc: "net@freebsd.org" <net@freebsd.org> Subject: Re: bsnmp and HOST-RESOURCES-MIB Message-ID: <86k3yzc01l.fsf@in138.ua3> In-Reply-To: <4FE31245.8020406@grosbein.pp.ru> (Eugene Grosbein's message of "Thu, 21 Jun 2012 19:23:33 %2B0700") References: <4FC5A9AF.1000003@rdtc.ru> <86lik9foup.fsf@kopusha.home.net> <4FE31245.8020406@grosbein.pp.ru>
next in thread | previous in thread | raw e-mail | index | archive | help
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@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@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@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@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@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@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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86k3yzc01l.fsf>