in reply to Re^2: threads and SNMP Session
in thread threads and SNMP Session
If you are issuing identical requests to multiple hosts, you can just use SNMP::Multi and forget about the details :)
If not, take a look at the source for SNMP::Multi, in particular the request() & execute() subs, to see what needs to be done. Basically, loop over the hosts issuing your get()s and passing a callback, (closures would be good here), and then enter the MainLoop and allow it to go to work.
Of course, there's a bit more to it that that with timeouts, retries and collating the information returned.
|
|---|