in reply to limiting number of snmp requests
Hello dilip.renkila,
If you want to probe each OID once only, then choroba’s approach is the correct one. But if you want to repeatedly re-probe the OIDs in batches of 50, you will need a circular list. See How do I handle circular lists? Here is one method:
#! perl use strict; use warnings; use Tie::Cycle; my @oids = (1 .. 370); tie my $oid, 'Tie::Cycle', \@oids; my $answer = 'Y'; while ($answer !~ /N/i) { print "Starting iteration\n"; print "probe $oid\n" for 1 .. 50; print "Continue? "; $answer = <STDIN>; }
This should give you an idea of how to proceed.
Hope that helps,
| Athanasius <°(((>< contra mundum | Iustus alius egestas vitae, eros Piratica, |
|
|---|