Hello there,
(we are migrating from UCD to NET-SNMP and have some implemetation
questions)
I was looking at the behaviour of the MibII/tcpTable module in the
source code, using it to try and understand the table-iterator pattern
used in the new Net-SNMP API. What I found was, everytime a variable is
requested through a GETBULK or GETNEXT, the entire table is
reconstructed, and then the single variable returned.
That is, for every iteration through the table rows, the entire row is
copied into the agent using snmp_set_var_value; and the entire table is
iterated over before the 'handler' method is called and the requested
variable is returned.
For small tables this is no big deal, but we are going to implement a
table with around 20 columns, and there are potentially hundreds of
rows: all this copying seems really expensive.
When I removed these 'snmp_set_var_value' calls from the iterator
method, the snmpwalk / snmptable calls (which do GETNEXT and GETBULK) no
longer worked properly. So contructing the table for this pattern seems
essential.
So, my questions are:
1) why is this table reconstruction necessary for every GETNEXT? (I am
assuming it is because the net-snmp core agent needs a snapshot of the
table in order to select the right column / row to return; and it makes
no assumptions about the table state between GETNEXT calls.)
2) Is this how the old UCD API worked? Does the new way solve any
errors? Will using the old UCD API be more efficient for large tables?
3) Is the mib2c 'mib2c.array-user.conf' a more efficient interface for
large tables, and are there examples of this pattern?
and finally,
4) Any recommendations for implementing large tables efficiently?
I appreciate your help. If this information is available in the
documentation at all please point me to it: I have read the FAQ and some
of the API, but any additional help is welcome.
Thanks in advance.
MV
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Mike Varley -= SOMA Networks =-
[EMAIL PROTECTED] 416-348-1578
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users