Re: snmp tables

Tsolakos Stavros <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
Hi.

Newbie warning!!! I am still a newbie! Please correct me if I am wrong
in my reply!

> 
> when using snmp tables, is there a way to get to a exact row number.
> currently i have to traverse all the rows to get to the one i want.
> 

Table rows are actually sets of columns, accessed by their index (or
indice) like that:

<your_table_sequence_oid>.<column_number>.index

Once you know the index (or the indice) you can get the value for each
column of the row. For example:

mytable.myentry.column_0.23
mytable.myentry.column_1.23
mytable.myentry.column_2.23
...
mytable.myentry.column_n.23

This would return all columns for the row with index 23. Note, that 23
does not mean that this is the 23rd row of the table! A table could very
well start from a row with index 300. This is more clear in tables that
have multiple indice. "myentry" is the sequence of the table, which is
usually the only subobject of the table itself and has the value of 1.

HTH,

Stavros


------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.