Le 01.06.2012 09:48, Petri Ojala a écrit :
> I'm using net-snmp with Perl scripts, using the SNMP (not Net::SNMP)
> package.  I'm doing asynchronous polls to a number of switches, 
> queueing
> them so that the number of simultaneous work is about ~100 targets 
> and
> the queue gets refilled as soon as data flows in.   There is an
> SNMP::Session open to each target and I'm doing frequent bulkwalks to
> fetch data, one bulkwalk per target.   The system is running the 
> latest
> Debian linux.
>
> The number of targets seem to be hit a ceiling at around 1024.  The 
> UDP
> socket is open (netstat shows >1024 udp sockets) but data doesn't 
> seem
> to flow.  I've also increased the number of files limit from standard
> 1024 to 4096 with no effect.  Likewise doesn't make a difference if I
> run the scripts as root or not.
>
> Any ideas what might be causing the 1024 limit?   Any help would be
> appriciated, I'm quite positive I'm not the first one with this 
> problem.

NetSNMP uses select as its event loop and there is a hard limit of 1024 
for this system call, through the limitation of fd_set. There is a 
workaround since NetSNMP 5.5 but it is not effective with 
snmp_sess_synch_response() until very late (from what I see, this does 
not work with NetSNMP 5.7.1 either). You need to use the current master 
branch to get a working setup.

I have blogged about it recently:
  
http://vincent.bernat.im/en/blog/2012-snmp-event-loop.html#limitation-of-file-descriptor-sets

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Reply via email to