in reply to Re: limiting number of snmp requests
in thread limiting number of snmp requests

Dilip, Here's another way of doing the loop. I am assuming the oids are the same everytime you execute the script. You did not specify if the script was executed once or many times to remember it's stopping point. I took the code from choroba and changed a few lines.
#!/usr/bin/perl use warnings; use strict; my @oids = ( '.1.2.3.4.2.1.3.0', '.1.23.4.2.1.3.4.0'); my $oid = undef; my $ct = 0; foreach $oid (@oids) { if ($ct > 50) { print "PROBED CT: \"$ct\" OIDS. SLEEPING X\n"; sleep + 10; $ct = 0; } print "PROCESSING OID: \"$oid\" \n"; $ct += 1; }
Joe