[mrtg] Re: SNMP_util.pm and bulk gets

Simon Leinen simon at limmat.switch.ch
Fri Jun 8 21:44:13 MEST 2001


>>>>> "dm" == Daniel McDonald <dmcdonald at digicontech.com> writes:
> I know this is a little off topic, but I can't find another forum
> where the SNMP_util.pm module is discussed...

This list if probably not too bad, although you could also write to
the author of SNMP_util.pm directly (Mike Mitchell
<Mike.Mitchell at sas.com>).  Maybe you did, or he also reads this
list... because in the meantime he has added an snmpgetbulk function
to SNMP_util.pm.

HOWEVER,

> I'm trying to add an snmpgetbulk method to the SNMP_util.pm module.
> Right now it returns the values, but no OIDs associated with them.
> Since setting the max-repetitions value is an in-exact science, I'm
> trying to figure out how you determine how many of the repetitions
> are from the same mib branch and how many are from a different
> branch.

this is quite different, and when you want to "walk" through a table,
it is especially different to group returned values by table row, as
there may be "holes" in the table which will make get-bulk (and
get-next) return values from different rows next to each other.

Therefore I have a strong opinion that an snmpgetbulk (or snmpgetnext)
routine is too low-level to be useful for writers of management
scripts.  Rather, SNMP libraries should include subroutines that make
it easy to walk through tables.

SNMP_util.pm now has snmpmaptable, which IMHO is a very nice interface
to walking tables.  Please try it and tell Mike and me whether you
like it.  Snmpmaptable will do get-bulk when using SNMPv2, so you will
automagically benefit from the speedup.  You can set the
"max-repetitions" field on a per-session basis if you want to tune
that (the default is 12).

> Has anyone delved into this module who might have some ideas on the
> best way to do bulk gets?  Sending a dozen or so gets per router is
> pretty time-consuming rather than using a single bulkget.

That's true.
-- 
Simon Leinen				       simon at babar.switch.ch
SWITCH				   http://www.switch.ch/misc/leinen/

	       Computers hate being anthropomorphized.

--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Archive     http://www.ee.ethz.ch/~slist/mrtg
FAQ         http://faq.mrtg.org    Homepage     http://www.mrtg.org
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi



More information about the mrtg mailing list