Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: limiting number of snmp requests

by Athanasius (Archbishop)
on Nov 06, 2015 at 16:56 UTC ( [id://1147110]=note: print w/replies, xml ) Need Help??


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,

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1147110]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (6)
As of 2024-03-19 09:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found