RE: Row operation in Net-SNMP
"Zheng, Wenjie (Barclay)" <[email protected]>
| Newsgroups | gmane.network.net-snmp.devel,gmane.network.net-snmp.user |
|---|---|
| Message-ID | <A8F658F27E2A06459025251CA0A460060F5007F1D7@FRMRSSXCHMBSA2X.dc-m.alcatel-lucent.com> |
Hi Fulko Thanks for your information, it’s really helpful. Thanks, Barclay ________________________________ From: Fulko Hew [mailto:[email protected]] Sent: 2013年4月27日 3:13 To: Zheng, Wenjie (Barclay) Cc: [email protected]; [email protected] Subject: Re: Row operation in Net-SNMP On Thu, Apr 25, 2013 at 11:14 PM, Zheng, Wenjie (Barclay) <[email protected]<mailto:[email protected]>> wrote: Hi Fulko Thanks for your response. Do you have any good examples or suggestions on how I can itorate the table in Getbulk operation in row instead of column? You can't.. Traversing an OID tree happens in lexicographical order, and so would getbulk. The only way to traverse a row (rather than a column) is to do it yourself (assuming you know what columns you want to get. Thanks, Barclay ________________________________ From: Fulko Hew [mailto:[email protected]<mailto:[email protected]>] Sent: 2013年4月24日 20:22 To: Zheng, Wenjie (Barclay) Cc: Dave Shield; [email protected]<mailto:[email protected]>; [email protected]<mailto:[email protected]> Subject: Re: Row operation in Net-SNMP On Wed, Apr 24, 2013 at 2:02 AM, Zheng, Wenjie (Barclay) <[email protected]<mailto:[email protected]>> 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. ------------------------------------------------------------------------------ Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET Get 100% visibility into your production application - at no cost. Code-level diagnostics for performance bottlenecks with <2% overhead Download for free and get started troubleshooting in minutes. http://p.sf.net/sfu/appdyn_d2d_ap1 _______________________________________________ Net-snmp-coders mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/net-snmp-coders