Re: question marks ('?') in snmptable output
Thanks Dave, here is some more information on our bug.
Dave Shield wrote:[color=blue]
> On 31/08/06, Mike Varley <email@example.com> wrote:
>> we are seeing an snmptable command respond with question
>> marks ('?') as the result for some of the column entries; and I am
>> wondering if this is normal behaviour if net-snmp encounters an error
>> while trying to interpret a response.[/color]
> Not an error as such, but it's the way snmptable displays "gaps" in a
> where a particular row is missing one or more column values.
Don't you hate it when people withhold information? :) I'm sorry, I
forgot to specify that that table is double-indexed by both the 'id' and
a numeric value. So here is a more accurate sample of the output:
id(index1) num(index2) ipaddress someotherinfo
0FB 1 192.168.26.101 abc
078 1 192.168.25.255 def
095 1 192.168.24.252 hij
095 2 192.168.24.253 klm
DE8 ? 192.168.21.34 ?
(repeat (x) times in output)
9D8 1 192.168.26.93 qrs
So, as you can see, our secondary index is one of those 'gaps' -- we did
a test to see what happens if you perform a GETNEXT and provide
(a) just the 1st index (index1), or
(b) a secondary index (index1.index2) that is valid but non-existant,
and the response is the first entry...
so if a request for 'GETNEXT DE8' is returning a bogus secindary index,
subsequent GETNEXT requests would return the same row: with a bogus
secondary index ... infinite loop! (or until the bogus secondary index
So here's the important question:
By 'gaps' do you mean the MIB code is replying with NULL? Or just an
incosistant value? (like, out of range, or an int when it should be a
string) -- I believe there is a case where we could be sending NULL back
as a column value...
> It might occur if the MIB-code is returning inconsistent data - e.g.
> if the table is changing while it's being retrieved. How are you
> implementing the table? Which helper? Is the table data cached at
> all, or is it retrieved afresh for each separate request?[/color]
We are using the old- UCD style MIB implementation, and the table is
maintained using the Initialise_Table, Search_Table, Add_Entry methods
found in net-snmp/agent/mibgroup/util_funcs.c
Thanks Dave, I will see if we can find the 'gaps'. But if you could help
me out by giving me an example of a 'gap' (like, returning NULL, or
out of range data or something) that would be great.
Mike Varley -= SOMA Networks =-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
Net-snmp-coders mailing list