On 8 September 2010 07:43, Ravi Kumar <[email protected]> wrote: > Could any one plz give me an example in which we need a separate snmp > sub-agent.
"Need" - probably never. "Could be useful" - very easily. Consider a routing agent, running on a gateway box. This will inherently contain all the information needed about the current routing configuration (since that's what it is there for), plus it's fairly easy to keep count of various statistics. This is all data that would be needed when implementing the relevant routing MIB. One option might indeed be to have a separate MIB module, which plugs into the main SNMP agent. But this MIB module code would still need to contact the routing agent to get hold of the data that it needs. Typically, this data will be cached within the MIB module, and hence be slightly out of date. An alternative is for the routing agent itself to register with the master SNMP agent as a "sub-agent" - purely responsible for the objects in the MIB. Then when a request for something in this MIB is received, it can be passed to the routing agent, which can use the current, up-to-date, accurate data. The downside is that there is then a bit more processing to be done within the routing agent - it needs to handle some of the SNMP-related stuff, not just providing the raw data. Exactly the same analysis could hold for other applications (e.g. database servers, web servers, mail systems, etc, etc). There has *always* got to be some form of communication between the SNMP agent, and the program that actually does the work. When using a subagent, this just moves the point where this communicaton happens. Dave ------------------------------------------------------------------------------ This SF.net Dev2Dev email is sponsored by: Show off your parallel programming skills. Enter the Intel(R) Threading Challenge 2010. http://p.sf.net/sfu/intel-thread-sfd _______________________________________________ Net-snmp-coders mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
