[SNMP4J] Counter32 with wrong value

Owen, Philip Philip.Owen at viatel.com
Tue Jun 19 12:02:32 CEST 2007


Hi,
 
I am trying to retrieve a Coutner32 value using an SNMP get with SNMP4J,
but am getting the wrong value. Whether I use the code I wrote (based on
the examples in the documentation), or using the SNMP4J executable I
still get the same result.
 
The snmpget command and the Net::SNMP Perl library both agree on what
the value should be, although if memory serves, they both use the same
back-end libraries.
 
SNMP4J:
C:\snmp4j\tool>SNMP4J.exe -c public -v 2c router
1.3.6.1.4.1.4874.2.2.35.1.4.3.1.1.2.363251293
19-Jun-2007 10:17:52 org.snmp4j.log.JavaLogAdapter log
INFO: UDP receive buffer size for socket 192.168.4.135/0 is set to: 8192
Received response after 94 millis
Response received with requestID=500261284, errorIndex=0,
errorStatus=Success(0)
 
1.3.6.1.4.1.4874.2.2.35.1.4.3.1.1.2.363251294 = 6746487
 
snmpget:
[user at hostname ~]$ snmpget -c public -v 2c -On router
1.3.6.1.4.1.4874.2.2.35.1.4.3.1.1.2.363251293
.1.3.6.1.4.1.4874.2.2.35.1.4.3.1.1.2.363251293 = Counter32: 473269566
 
I can see no reason why these values are so different. The OID in
question is row index 363251293 of a table (no, they don't start at 1
:-) ) if that matters.
 
It does not seem to affect all entries on this table, most of them come
through okay, but this is the biggest value I have seen so far.

I tried getting SNMP4J.exe to retrieve using getTable() but cannot get
it to return the right row index. I know that is a separate issue, but
thought it might help to see what value it obtained that way. Maybe I am
just not specifying the lower and upper bounds properly.
 
Thanks,
 
Philip.


For more information about the Viatel Group, please visit www.viatel.com

VTL (UK) Limited Registered in England and Wales
Registered Address: Inbucon House, Wick Road, Egham, Surrey TW20 0HR  
Company Registration No: 04287100 VAT Registration Number: 781 4991 88

THIS MESSAGE IS INTENDED ONLY FOR THE USE OF THE INTENDED RECIPIENT TO WHICH IT IS ADDRESSED AND MAY CONTAIN INFORMATION THAT IS PRIVILEGED, CONFIDENTIAL AND EXEMPT FROM DISCLOSURE.  If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering the message to the intended recipient, you are notified that any dissemination, distribution or copying of this e-mail is prohibited, and you should delete this e-mail from your system.

This message has been scanned for viruses and spam by Viatel MailControl - www.viatel.com



More information about the SNMP4J mailing list