Skip Menu |

This queue is for tickets about the SNMP-Multi CPAN distribution.

Report information
The Basics
Id: 1526
Status: new
Priority: 0/
Queue: SNMP-Multi

People
Owner: Nobody in particular
Requestors: bastian.angerstein [...] hardwarefusion.com
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: (no value)
Fixed in: (no value)



Subject: decreasing performance during request of multiple hosts
I noticed a high decrease of performance during request of multiple hosts. It it more time intensive to request 5 hosts at a time than request 5 host serial (with snmp.pm). Second bug it is not possible to pass multiple numeric oids in an @array to the module, they have to be added one by one. Another Wish: Better documented and working code examples.
[guest - Wed Sep 18 02:21:53 2002]: Show quoted text
> I noticed a high decrease of performance during request of multiple > hosts. > It it more time intensive to request 5 hosts at a time than request 5 > host serial (with snmp.pm). > > Second bug it is not possible to pass multiple numeric oids in an > @array to the module, they have to be added one by one. > > Another Wish: Better documented and working code examples.
Just another wish: the modul should return the numeric oid, too.
[guest - Wed Sep 18 02:23:17 2002]: Show quoted text
> [guest - Wed Sep 18 02:21:53 2002]: >
> > I noticed a high decrease of performance during request of multiple > > hosts. > > It it more time intensive to request 5 hosts at a time than request
> 5
> > host serial (with snmp.pm).
Unsurprising. Laying the groundwork - in Perl - takes time. SNMP is a fast protocol amd the SNMP.pm module is primarily C. See where I'm going? At some point, there will likely be enough machines to offset the startup cost. Show quoted text
> > Second bug it is not possible to pass multiple numeric oids in an > > @array to the module, they have to be added one by one.
If I understand you correctly, it sounds as if your having problems constructing VarBinds. Please refer to SNMP.pm documentation, this is not part of SNMP::Multi. Show quoted text
> > Another Wish: Better documented and working code examples.
Patches welcome. :-) Show quoted text
> Just another wish: the modul should return the numeric oid, too.
This is another SNMP.pm issue. Please refer to the SNMP documentation, and read about its class variables. -Joshua PS In the future, please submit individual trouble tickets for individual issues. Makes it easier to track. Thanks.
[guest - Wed Sep 18 02:23:17 2002]: Show quoted text
> [guest - Wed Sep 18 02:21:53 2002]: >
> > I noticed a high decrease of performance during request of multiple > > hosts. > > It it more time intensive to request 5 hosts at a time than request
> 5
> > host serial (with snmp.pm).
Unsurprising. Laying the groundwork - in Perl - takes time. SNMP is a fast protocol amd the SNMP.pm module is primarily C. See where I'm going? At some point, there will likely be enough machines to offset the startup cost. Show quoted text
> > Second bug it is not possible to pass multiple numeric oids in an > > @array to the module, they have to be added one by one.
If I understand you correctly, it sounds as if your having problems constructing VarBinds. Please refer to SNMP.pm documentation, this is not part of SNMP::Multi. Show quoted text
> > Another Wish: Better documented and working code examples.
Patches welcome. :-) Show quoted text
> Just another wish: the modul should return the numeric oid, too.
This is another SNMP.pm issue. Please refer to the SNMP documentation, and read about its class variables. -Joshua PS In the future, please submit individual trouble tickets for individual issues. Makes it easier to track. Thanks.
From: Bastian.Angerstein [...] Hardwarefusion.com
[JOSHUA - Wed Sep 18 17:02:17 2002]: Show quoted text
> [guest - Wed Sep 18 02:23:17 2002]: >
> > [guest - Wed Sep 18 02:21:53 2002]: > >
> > > I noticed a high decrease of performance during request of
multiple Show quoted text
> > > hosts. > > > It it more time intensive to request 5 hosts at a time than
request Show quoted text
> > 5
> > > host serial (with snmp.pm).
> > Unsurprising. Laying the groundwork - in Perl - takes time. SNMP is a > fast protocol amd the SNMP.pm module is primarily C. See where I'm > going? At some point, there will likely be enough machines to offset
the Show quoted text
> startup cost. > >
> > > Second bug it is not possible to pass multiple numeric oids in an > > > @array to the module, they have to be added one by one.
> > > If I understand you correctly, it sounds as if your having problems > constructing VarBinds. Please refer to SNMP.pm documentation, this is > not part of SNMP::Multi. > >
> > > Another Wish: Better documented and working code examples.
> > Patches welcome. :-) > >
> > Just another wish: the modul should return the numeric oid, too.
> > This is another SNMP.pm issue. Please refer to the SNMP documentation, > and read about its class variables. > > -Joshua > > PS In the future, please submit individual trouble tickets for > individual issues. Makes it easier to track. Thanks.
Ok, here is a understandable example of the Use of SNMP::Multi : sub requests { #SNMP Request on Multiple Routers use SNMP::Multi; $routers[0] = router.somewhere.com; $routers[1] = router.somewhere.de; $routers[2] = router2.somewhere.de; $mib = 1.2.3.6.1.1.1.1.1.1 ; #example! my $community = "letmelookinyourbook"; my $requested = SNMP::Multi::VarReq->new ( nonrepeaters => 0, hosts => [ @routers ], vars => [ $mib ], ); my $session = SNMP::Multi->new ( Method => 'bulkwalk', MaxSessions => 36, PduPacking => 16, Community => "$community", Version => '2c', Timeout => 3, Retries => 2, ) or warn "$SNMP::Multi::error \n"; $session->request ($requested) or warn $session->error; my $resp = $session->execute(10) or warn "Execute:$SNMP::Multi::error\n"; for my $host ($resp->hosts()) { print $host; for my $result ($host->results()){ if ($result->error()){ print "Could not request objekt $host $mib"; next; } # result is an datastructur keep every varlist coming from # the requested host. for my $varlist ($result->varlists()){ # foreach varlist do $interface=0; #for my $ifstuff ($varlist->[$interface]) { # should work, too while ($varlist->[$interface]){ #varlist is an array of arrays $ifstuff = $varlist->[$interface]; print $host; #(Host) #now we going to look in the array to see what is there. print $ifstuff->[3]; #(Typ) print $ifstuff->[2]; #(Value) print $ifstuff->[1]; #(Interface) print $ifstuff->[0]; #(Mib) $interface++; } } } } }