env MIBS="+SNMP-***-MIB" mib2c netTrafficTable
what's wrong with me?
Dave Shield <[EMAIL PROTECTED]> wrote:
On Mon, 2005-05-09 at 05:01, Sim Wind wrote:
> In the funtion udpTable_handler of the file udpTable.c, I find
> it process only MODE_GET, the other mode is ignored.
Correct.
> I'm confused about it because i can get the result by
> snmpgetnext on udpLocalAddress, has it been ignored?
No - it hasn't been ignored by the agent as a whole.
Note that udpTable is implemented using the 'table_iterator'
helper. One of the the things that this helper does is
decide which row is appropriate for a given SNMP request.
The *helper* takes care of the GETNEXT processing, and
effectively turns this into an equivalent GET request.
The udpTable_handler only needs to be concerned with
(simpler) exact GET requests.
> Now i will implement a table with one more indexs,
No problem.
All of the table helpers can cope with multiply-indexed
tables. Just list all of the index types in the
netsnmp_table_helper_add_indexes(...) call.
> the table info is kept in a file which is often changed by other
> application at agent, i need parse the file info to refresh my table
> struture, if i parse the file in function var_talbe, i'm afraid it
> will infect the efficiency, so i want to parse it every other minutes
> by other means, any good idea?
Use the cache helper. That can be used to (re)load your data
whenever it's "too old", caching it for subsequent use.
The current development code includes versions of
mib2c.iterate.conf and mib2c.table_data.conf that can generate
support for cached tables.
Try "mib2c -Scache=true ...."
Dave
Do you Yahoo!?
Yahoo! Mail - Helps protect you from nasty viruses.
