2009/3/30 Tanisha Kashyap <tanisha.kash...@aricent.com>:
>> Whenever you're working with SNMP, you'll always have an "agent" - a process
>> that is running all of the time, and will respond to requests for 
>> information.

> This agent is the net-snmp daemon snmpd?

The Net-SNMP daemon "snmpd" is an example of an agent, yes.
Other vendors also provide similar software.


>> One approach is to write a new chunk of code, and include it within the agent
>> (by recompiling the agent, and restarting it).   So you've essentially got a 
>> new
>> agent, that knows a bit more than before.   This is the most efficient 
>> approach,
>> but does involve a (hopefully short) break in service.

> is the agent code recompilable?

The Net-SNMP agent source code is available, so our agent can be recompiled.

> I read in Solaris handbook that the agent code cannot be recompiled.

I have no idea what SNMP agent this refers to.
But if it's talking about Sun's own agent (either developed in-house, or one
that they bought in from some third party), then it wouldn't surprise me if
the source code isn't available.

But this list is specifically provided to support for the Net-SNMP software,
so when we talk about an agent, we're typically talking about *our* agent.



>> A related approach is to write the same new chunk of code, but compile it 
>> into
>> a .so file, and have the main agent load this dynamically.

> Since the dynamically loaded module will be a .so file which is called
>  when the snmpd comes up so how does it run like a process?

It's the "snmpd" agent that runs as a process - not your .so file.
Your new module is effectively bolted on to the snmpd binary.


>> So here you now have *two* processes running at the same time.

> how is the subagent actually developed.

Personally, I tend to use the main agent framework, so haven't really looked
at developing subagents much.   But I believe you can run

    net-snmp-config  --compile-subagent    mySubAgent   myModule,c

to generate a subagent binary.


> This information is crucial since it would really help me decide
> what approach I should take.

The design of the Net-SNMP agent is such that is does *NOT* matter
which approach you take (at least from the SNMP side).   The MIB
module code would be the same in all three cases.
   You can take a MIB module, originally coded to run as static code
within the main agent binary,  and recompile it as a subagent,
without touching the code file itself.   That's been a design feature,
right from the start of the AgentX (i.e. subagent) support.

Dave

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