[SNMP4J] Question regarding threads and MultiThread Dispathcer

Frank Fock fock at agentpp.com
Mon Nov 13 17:56:28 CET 2006


Hi Paris,

Paris Apostolopoulos wrote:
> Hello to you all!
> 
> I have a question regarding the internals of SNMP4J I have to admit I am 
>  a bit lost. My scenario is the following!
> 
> I am building an SNMP manager and I want to Scan a network domain 
> 192.168.1.XXX , so I want to issue for 255 IPs a SNMP command (a GET) 
> asynchronously and receive the responses.
> 
> My question is the follwing
> 
> Ι use the Same SNMP instance and I loop changing the target.Is that right?
> 
Yes.

> Every send to a different IP I make internally creates a listening 
> thread for the response?
>
No. For each Snmp instance there is thread to process
async responses and for each transport mapping there is
a thread that processes incoming messages.

> Or there is a single incoming connection point that waits for the 
> responses?
> 
Yes, exactly (see also above).

> When it comes the multithreaded dispatcher? If I create a pool of 10 
> threads it means that 10 threads will be reading and dispatching 
> requests from the listening port?
> 
Yes. The advantage of the MultiThreadedMessageDispatcher is that
it does not block the transport mapping from processing other
messages while the dispatcher processes them. This can help
to avoid UDP buffer overflows at the listening port, for example.

Best regards,
Frank




More information about the SNMP4J mailing list