On Wed, Apr 24, 2013 at 2:02 AM, Zheng, Wenjie (Barclay) <
barclay.zh...@alcatel-lucent.com> wrote:
> Hi, Dave et al,
>
> I have a puzzle of Net-SNMP table operation, for example I have a table
> like below:
>
> a1-a2-a3-a4
> b1-b2-b3-b4
> c1-c2-c3-c4
>
> In net-snmp, if I use iterator helper to implement the table handler, it
> will translate the getbulk request to bunch of get request, the order is:
> a1->b1->c1->a2->b2->c2.....
>
> So it's first column then send column and so on. In my case, the data is
> stored ourside in row order, like first row, second row.
> a1->a2->a3->a4->b1->b2....
>
The iterator, just like the definition of how getNext() works, is:
it follows OIDs 'in order'; and OIDs define entries as:
table.column.index...
So the indexes are all traversed first ... before it 'backs up' to go to
the next column
... before it goes to the next table... etc.
> I can read the whole row one time, and then return all the values for the
> whole row. Then I only need read outside data 3 times for the whole table.
> But in the iterator helper, I will need to read outside data 12 times for
> the whole table.
>
That is indeed what you need to do if you want to optimize/minimize the
number of
transactions on the network.
------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders