Hi,
I am using net-snmp5.1.1 in Linux and I have a below requirement in agent implementation:
1. I have some api's about the mib data which I need to call in a common place in a loop so that the current data will get updated frequently. Also, the first time, data should be stored in the agent memeory for all the tables when we start the agent ( as like snmpd.conf) . Then it should update the latest data after a certain time interval delay. ( say 1 minute)
2. I will use those data in my get_first and get_next routines to assign the proper values for each column.
The reason for this requirement is, it is not easy to use my api call inside the get_first and get_next because it takes some time to fetch the data from the api's and if we do it inside get_first or get_next, the snmp retrieval will affect the performance.
Also, do we have the multi-threading support in net-snmp? I feel the best way to solve this is by using the threading concept so that filling the table data structures and the snmp process can happen parallely.
This part I can answer. No the agent is not currently thread safe, and neither is a large portion of the libraries from what I can gather. I believe you could, however, run the snmp code in one thread and your data gathering in another as long as your data structures were in critical sections. Someone elses may have a different approach that is worth mentioning.
Andy
Thanks for your help.
Regards, Karthik. N
------------------------------------------------------- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl _______________________________________________ Net-snmp-coders mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
