[SNMP4J] snmp4j with threads

Frank Fock fock at agentpp.com
Mon May 2 21:35:56 CEST 2005


Hi Liav,

A null response represents a timeout. A timeout can occur indepently
from using threads. Try to increase the timeout value.

In general, it is better to use a single Snmp instance because that
consumes less resources (there is a thread associated with each
Snmp instance).

Best regards,
Frank

Liav Elias wrote:

>Hi, 
>
>I am using snmp4j for get requests with snmp version 3.
>I am using 2 threads at the same time in order to execute get request from 2 different agents - each thread is 
>sending the request for only one agent so each thread has its own agent to contact.
>I use synchronized get request.
>Each thread is using its own snmp object and  both use the same configuration for the USM user and all the rest of the configuration is equal between the threads.
>
>The problem is that sometimes I get in the response good results but sometimes I get the response
>as NULL from one of the threads.
>Does working with 2 snmp object can cause this problem?
>
>thanks,
>Liav
>
>
>_______________________________________________
>SNMP4J mailing list
>SNMP4J at agentpp.org
>http://lists.agentpp.org/mailman/listinfo/snmp4j
>
>  
>





More information about the SNMP4J mailing list