[SNMP4J] Concurrent requests for multiple agents.

Frank Fock fock at agentpp.com
Wed May 18 09:25:19 CEST 2005


Hi Lilach,

Lilach Refaeli wrote:

>I have a multi-threaded Application, which sends requests to different
>agents concurrently (synchronously).
>
>It uses one instance of the SNMP object.
>
>The USM user parameters (authentication passphrase, authentication
>protocol ID, etc.) of all the agents are identical.   
>
>My question is: 
>
>Should I add a USM user for each agent?  How would the SNMP object know
>  
>
No, since all your your user and password pairs are identical, you only
add the user once. Otherwise, if you add it (non localized - thus 
without engine ID)
at a later time other requests running concurrently will see timeouts 
out of time
window errors.

>which USM user to use for the sending operation?  (When is the agent-ID
>discovery process activated?)
>
>  
>
The engine ID of a target is discovered when a request is sent to it and 
there is
no engine ID known for that target.

>Is there a way to explicitly perform the agent ID discovery? (To add a
>user and associate it with a specific engine ID)
>
>  
>
Yes, you can disable engine ID discovery at the USM class and use
MPv3.getEngineID(Address addr) to discover the engine ID.

> 
>
>When I add a USM user with no agent ID parameter and send requests
>concurrently, I get an usmStatsNotInTimeWindows response or a timeout
>occurs. 
>
> 
>  
>
This can be caused by updating the user while requests are currently 
processed
(or if some of the targets share the same engine ID - but that should 
not be the case).

Best regards,
Frank





More information about the SNMP4J mailing list