[SNMP4J] Strange problem with multithreaded SNMPv3-Scan

Mathias Bogaert m.bogaert at memenco.com
Mon Nov 8 18:50:33 CET 2004


Hey,

Have you tried increasing the UDP buffer of the underlying operating 
system? Also, try increasing the file handles (one socket is also a 
file handle) the process can allocate.

Mathias Bogaert

On 08 Nov 2004, at 18:40, chk-world at gmx.de wrote:

> Hi again,
> ok, I tried the following to solve the problems described in my last 
> post:
> - Updating the library (now I'm using the latest 1.0.3c).
>
> Using synchronous sending and a thread pool:
> doing something like "response = snmp.sendPDU(request, uTarget);" in 
> the run
> method with a timeout of 1500 or more and retries of 3 or more in a 
> Runnable
> which is called via:
> // -------------------------
> for (int i = 1; i < 30; i++)
> {
>   pooledExecutor.execute(new RunnableSender("10.137.1." +
> Integer.toString(i)));
>   Thread.sleep(slowdown);
> } // -------------------------
> I was setting setAsyncMsgProcessingSupported to false. So every library
> initialisation is done inside my RunnableSender.
> If slowdown is bigger than 1000 everything works fine. If slowdown is 
> less
> than 1000 I get Timeouts from some agents (of course different agents 
> on
> different runs!).
> How come? Is this library realy thread save in this case?
>
> My second approache was to try asynchronouse sending:
> for (int i = 1; i < 30; i++)
> {
>  configData.setSnmpBaseNetwork("10.137.27." + i);
>  senderList.add(new SNMPv3Query(configData));
>  Thread.sleep(slowdown);
> }
> I was setting setAsyncMsgProcessingSupported to true. And in 
> SNMPv3Query
> doing "snmp.sendPDU(request, uTarget, new Object(), this);".
> Still there is the same odd behavior: If slowdown is bigger than 1000
> everything works fine. If slowdown is less than 1000 I get Timeouts 
> from
> some agents (of course different agents on different runs!).
> How come? Is this library realy thread save in this case?
>
> If I say timeouts: In most cases the result is null.
>
> Could someone please give me a hint? Or hase someone doen something 
> like
> this with this library?
>
> Thanks,
> Chris
>
> -- 
> Geschenkt: 3 Monate GMX ProMail + 3 Top-Spielfilme auf DVD
> ++ Jetzt kostenlos testen http://www.gmx.net/de/go/mail ++
>
> _______________________________________________
> SNMP4J mailing list
> SNMP4J at agentpp.org
> http://p15141779.pureserver.info/mailman/listinfo/snmp4j
>
>




More information about the SNMP4J mailing list