[SNMP4J] Counter32 with wrong value
Owen, Philip
Philip.Owen at viatel.com
Tue Jun 19 13:44:04 CEST 2007
Hi Frank,
I have got to the bottom of this. I had used pdu.setType(PDU.GETNEXT)
rather than pdu.setType(PDU.GET), and was hence getting the next record.
Understandable really :-)
I presume that the console tool must have a similar bug, but you are in
a far better position than I to determine if that really is the case.
Thanks again for looking at this.
Phil.
Owen, Philip wrote:
>
> Hi Frank,
>
> Thanks for the response.
>
> I thought I was going mad there. However, it seems that the
> value is correct, but the wrong table row is being returned.
> The request is for 363251293, but the response is from
> 363251294. I had not noticed that before, only when you
> mentioned it based on the output below.
>
> If I use snmpget for 363251294 I get the same value as
> SNMP4J.exe returns when asked for 363251293.
>
> Thanks,
>
> Phil.
>
> Frank Fock wrote:
> >
> > Hi,
> >
> > you get different results, because you request different objects.
> >
> > Best regards,
> > Frank
> >
> > Owen, Philip wrote:
> > > 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
> > > _______________________________________________
> > > SNMP4J mailing list
> > > SNMP4J at agentpp.org
> > > http://lists.agentpp.org/mailman/listinfo/snmp4j
> >
> > --
> > AGENT++
> > http://www.agentpp.com
> > http://www.mibexplorer.com
> > http://www.mibdesigner.com
> >
> >
More information about the SNMP4J
mailing list