On 6 July 2012 06:01, Benix Vincent <benixvinc...@yahoo.com> wrote: > To install a dynamically growing tabular mib, how to query the number of > row entries?
It depends on the MIB. Some tables have an accompanying scalar object that reports the number of rows in the table. (e.g. IF-MIB::ifNumber) Other MIBs would require you walk the table in order to determine the number of rows within it. > Is it mandatory to use “snmp get next”? If you know the index values that will be used for entries in the table, then you can use GET requests to retrieve the particular entries that you're interested in. If the index values are not predictable (e.g. network connections, or process IDs), then you'll probably need to use GETNEXT instead. > Can I have a global variable and keeps incrementing as the table grows? You can certainly have a global scalar variable to report the size of the table. But this may be independent of what the index values actually are. Just knowing the size of the table does not in itself avoid the use of GETNEXT requests. (Though it does mean you could issue a single GETBULK request to pull down the whole table in one go!) Dave ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ 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