On Wed, 8 Jul 2015 17:30:44 +0000 Mani wrote:
MP> My use case is I want to be able to a create table data set along with
MP> the index and column defintions initially. But in a request context I
MP> want to be able to add rows to the table (say a api call to fill the
MP> rows of the table). As this data is constantly changing I am ok with
MP> deleting the previous rows in the table and adding new rows everytime
MP> the handler is called. How can I go about doing it ? I saw in the forum
MP> one of the posts suggested holding the netsnmp_table_data_set*
MP> reference as a global as there is no way of obtaining it with in the
MP> helper ? So put simply I want to be able to create a table or add rows
MP> to a table and access it when the handler gets called ... 

Take a look at the notification log table. It uses the table_data_set
handler, and uses a snmp_alarm to periodically trib the table size.

   agent/mibgroup/notification-log-mib/notification_log.c

You say your data is constantly changing - does that mean indexes too? Or
just the column data? Do you really need tight synchronization for the
data, or might it be ok to cache for a short period (at least a few
seconds, long enough that a snmpwalk would return consistent data from a
given snapshot)? How often do you realistically expect clients to be polling
the data?

-- 
Robert

------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to