Re: [pysnmp-users] Throttling asyncore transmit.
Brought to you by:
elie
From: Ilya E. <et...@gm...> - 2018-03-17 08:28:39
|
Hi Peter, I think the easiest approach would be to make your script sending SNMP queries in chunks. In other words, you can implement the rate limiting yourself. If you take this simple example [1] and invoke `getCmd` for a subset of your SNMP agents/OIDs from the callback function `cbFun`, that should give you total control on the packet flood you generate. So once you get a response (or time out), the `cbFun` get invoked by pysnmp. Then, besides consuming the response you can send some more SNMP queries. Keep in mind that you still need the initial `getCmd` to get things running. 1. http://snmplabs.com/pysnmp/examples/hlapi/asyncore/manager/cmdgen/snmp-versions.html#snmpv2c p.s. I’d suggest moving to GitHub issues for further communication as SourceForge seems to become less relevant unfortunately > On 16 Mar 2018, at 22:46, Peter K <pe...@kr...> wrote: > > Hi Group, > > I just started playing with pysnmp as i need to collect snap data from approx 2000 hosts, > and i have chosen to do it with asyncore. And i must say it works very well. > > As pysnmp just generates and sends the requests very very fast. I suspect that some of my requests > might be dropped on my upstream link, resulting in missing answers. > > I have looked through the source, and used up all my search engine skills… > Is there a way to make the async requests being sent at a controlled rate ? > > > Med venlig hilsen / Kind Regards > Peter Krüpl > |