www.emsdn.com
Class Profile: Home »» Networking [Networking] under "Networking" »»» question marks ('?') in snmptable output

question marks ('?') in snmptable output


Appologies if this is the wrong list to ask, but I am currently chasing
a bug where 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.
example:
snmptable -c public -Cl localhost mytable -Co
"index=id,col3=num,col4=ip"
id num ip
091 1 192.168.24.85
201 1 192.168.24.119
76E 1 192.168.26.9
118 1 192.168.26.11
286 1 192.168.26.28
CFB 1 192.168.26.101
078 1 192.168.25.255
095 1 192.168.24.252
DE8 ? ?
9D8 1 192.168.26.93
also, we've noticed that when the '?' appears, the row is actually
repeated over and over again (sometimes thousands of times!) as if the
bulk-get gets stuck retreiving the same index over and over again.
Has anyone seen behaviour like this before?
Is this expected if the MIB-code is returning erroneous data?
Thanks for any input you can provide.
MV


No. 1# | By Developer Tags User at [2008-5-5] | size: 1921 bytes

31/08/06, Mike Varley <mvarley (AT) somanetworks (DOT) comwrote:
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.

Not an error as such, but it's the way snmptable displays "gaps" in a table,
where a particular row is missing one or more column values.

id num ip
095 1 192.168.24.252
DE8 ? ?

I'm not exactly sure what the indexing for this table is, but assuming
it's the 'id' field,
what does a GETNEXT request for
id.095 num.095 ip.095
return?

(, replace this with the correct column names and index value
for the row immediately before the first '?' one).

also, we've noticed that when the '?' appears, the row is actually
repeated over and over again (sometimes thousands of times!) as if the
bulk-get gets stuck retreiving the same index over and over again.

That sounds as if one particular column is returning thousands of
intervening values,
before the next "complete" row.

Is this expected if the MIB-code is returning erroneous data?

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?

Dave

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
Net-snmp-coders (AT) lists (DOT) sourceforge.net

No. 1# | By Developer Tags User at [2008-5-5] | size: 2629 bytes

Thanks Dave, here is some more information on our bug.

Dave Shield wrote:
31/08/06, Mike Varley <mvarley (AT) somanetworks (DOT) comwrote:

>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.


Not an error as such, but it's the way snmptable displays "gaps" in a
table,
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
is corrected).

So here's the important question:
By 'gaps' do you mean the MIB code is replying with NULL? 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?

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

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.

Dave

No. 1# | By Developer Tags User at [2008-5-5] | size: 2738 bytes

31/08/06, Mike Varley <mvarley (AT) somanetworks (DOT) comwrote:
Don't you hate it when people withhold information? :)

a) You might say that - I couldn't possibly comment
b) You get used to it after two or three years on the list :-(

So here is a more accurate sample of the output:

id(index1) num(index2) ipaddress someotherinfo
095 2 192.168.24.253 klm
DE8 ? 192.168.21.34 ?

Hmmm so the '?' appears in one of the index columns as well.
Are these indexes accessible or not?

If they are, then the original analysis probably still stands.
If not, then I'd need to have another look at the code (which is
unlikely to be before the weekend, I'm afraid).

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,

No - that's not quite what I meant. Sorry, I wasn't clear enough.
Try a single GETNEXT request, containing two (valid) IDs from the
previous row of the table - one referring to the instance immediately
above one of the '?'s and one referring to the instance immediately
above a valid value in that row.
What do the results of that GETNEXT look like? In particular, do
the instance subidentifiers of the two IDs returned match each other?
Normally, a GETNEXT of two instances should walk through the table in
step with each other - returning matching instance subidentifiers each
time. The '?'-style output would normally arise if these two got out
of sync.

By 'gaps' do you mean the MIB code is replying with NULL? just an
incosistant value?

No - they'd be perfectly reasonable values returned. Just not
referring to the same row.
For example:

GETNEXT myCol myLoc
RESPNSE myCol.1 myLoc.1
GETNEXT myCol.1 myLoc.1
RESPNSE myCol.2 myLoc.2
GETNEXT myCol.2 myLoc.2
RESPNSE myCol.3 myLoc.5

That last response would result in a '?' being displayed for the
"myLoc" column in row #3. K?

Dave

PS: I may not respond for a couple of days - away visiting friends.
I'll pick up on any unfinished business when I get back.

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
Net-snmp-coders (AT) lists (DOT) sourceforge.net

No. 1# | By Developer Tags User at [2008-5-5] | size: 3054 bytes

Thanks Dave.

problem we have with this bug is it is very difficult to reproduce;
I am trying to create some samples which will simulate the failure.

The indexes are accessible.

Thanks for the clarification on what a 'gap' or '?' might be; it will
help me in creating the samples :)

The current hypothesis is we have a buffer overrun, and its messing with
the secondary index.

MV

Dave Shield wrote:
31/08/06, Mike Varley <mvarley (AT) somanetworks (DOT) comwrote:

>Don't you hate it when people withhold information? :)


a) You might say that - I couldn't possibly comment
b) You get used to it after two or three years on the list :-(

>So here is a more accurate sample of the output:
>>

>id(index1) num(index2) ipaddress someotherinfo
>095 2 192.168.24.253 klm
>DE8 ? 192.168.21.34 ?


Hmmm so the '?' appears in one of the index columns as well.
Are these indexes accessible or not?

If they are, then the original analysis probably still stands.
If not, then I'd need to have another look at the code (which is
unlikely to be before the weekend, I'm afraid).


>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,


No - that's not quite what I meant. Sorry, I wasn't clear enough.
Try a single GETNEXT request, containing two (valid) IDs from the
previous row of the table - one referring to the instance immediately
above one of the '?'s and one referring to the instance immediately
above a valid value in that row.
What do the results of that GETNEXT look like? In particular, do
the instance subidentifiers of the two IDs returned match each other?
Normally, a GETNEXT of two instances should walk through the table in
step with each other - returning matching instance subidentifiers each
time. The '?'-style output would normally arise if these two got out
of sync.


>By 'gaps' do you mean the MIB code is replying with NULL? just an
>incosistant value?


No - they'd be perfectly reasonable values returned. Just not
referring to the same row.
For example:

GETNEXT myCol myLoc
RESPNSE myCol.1 myLoc.1
GETNEXT myCol.1 myLoc.1
RESPNSE myCol.2 myLoc.2
GETNEXT myCol.2 myLoc.2
RESPNSE myCol.3 myLoc.5

That last response would result in a '?' being displayed for the
"myLoc" column in row #3. K?

Dave

PS: I may not respond for a couple of days - away visiting friends.
I'll pick up on any unfinished business when I get back.

No. 1# | By Developer Tags User at [2008-5-5] | size: 1107 bytes

31/08/06, Mike Varley <mvarley (AT) somanetworks (DOT) comwrote:
problem we have with this bug is it is very difficult to reproduce;
I am trying to create some samples which will simulate the failure.

:-(
Never a good sign.

The current hypothesis is we have a buffer overrun, and its messing with
the secondary index.

possibility would to run "snmptable -d" (or "snmptable -Ddump")
which would print out the request/response packets as they are
sent/received. You could then wade through the mountains of
output(!), to try and locate an individual GETNEXT request that
results in a '?' row.

The indexes for that response might help to throw some light on the matter.

Good Luck!

Dave

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
Net-snmp-coders (AT) lists (DOT) sourceforge.net



Networking Hot!

Networking New!


Copyright © 2008 www.emsdn.com • All rights reserved • CMS Theme by www.emsdn.com - 0.359