Hello,

Our SNMP manager needs to monitor many snmp agents. The manage uses thread pool 
to get job done. I have read README.thread and user archives. I'm still not 
sure about how to use NetSnmp library so that our program is thread safe. Our 
current thinking is:

 1.  Use single mutex to control all activities associated with agents that 
need to use SNMP v3 protocol (we only have a few of those)
 2.  Have separate lock for each snmp agent so that MIB data queries to an 
agent will be synchronized but allow different threads query for different 
agents using SNMP v2 in parallel
 3.  Using Single API to open a session for each agent. Each session can be 
reused by different threads but not at the same time; one session can be used 
by at most one thread at any time.
Is this the proper way to use Single API session? Is above approach thread safe?

It is not clear to me if a session opened with Single API can only be used by 
the thread that opened it or can be used by other thread also but not at the 
same time.

Thanks a lot for your help in advance,
Xiangyang


------------------------------------------------------------------------------
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

Reply via email to