[SNMP4J] Inconsistent Timeout Setting?

Anle Zhou zhouanle at gmail.com
Mon Apr 25 06:32:52 CEST 2005


Hi,

I'm confusing about the timeout now, would you please give some
comments. In the API document I found comments of the
Target.setTimeout() method is:

"Parameters:
        timeout - timeout in 'milliseconds' before a confirmed request
is resent or timed out."

, but when I run snmp4j_tool from command line, the snmp4j_usage.txt remind me:

"-t  timeout           Sets the timeout in 'micro seconds' between retries.
                        Default is 1000 micro seconds."

, I think these two timeout unit is inconsistent(milliseconds or mirco
seconds?). So I look into the source of
org.snmp4j.tools.console.SnmpRequest.java, in this file line 84
declare the timeout,
"int timeout = 1000;", then the send() method invoke
target.setTimeout(timeout); to set timeout value, so it should be
'milliseconds' according to the API, right?

PS: The packages I used are "SNMP4J sources and library v1.5RC2" and
"SNMP4J command line tool binaries v1.5".

One more issue here.
I run "./SNMP4J-linux +javahome /usr/lib/j2sdk1.4.2/ -u public -Ol
0.0.0.0/162" from command line to listen trap/inform on 162 port, then
I ssh to another machine, and send some informs to my machine,
sometime(often) I lost the request and got no response. How about
this? Should I set longer timeout value?

PS: These two machines run Debian/Linux sarge, and J2sdk 1.4.2.

Thanks a lot.

Regards,
Alan

-- 
Humble, but not shallow.



More information about the SNMP4J mailing list