RE: sending traps

Tanisha Kashyap <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <08A2197FCF31F642988F149222F8B88D0E2B75419D@GUREXMB01.ASIAN.AD.ARICENT.COM>
Just a few more question....
If I develop a subagent then that would run independent of the master agent i.e. snmpd?

Will that be a master-slave mode?

The end product would be a daemon which would run like the snmpd does?

"No task is so humble that it does not offer an outlet for individuality"


-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Dave Shield
Sent: Monday, March 30, 2009 5:10 PM
To: Tanisha Kashyap
Cc: [email protected]
Subject: Re: sending traps

2009/3/30 Tanisha Kashyap <[email protected]>:
>> 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

"DISCLAIMER: This message is proprietary to Aricent and is intended solely for the use of the individual to whom it is addressed. It may contain privileged or confidential information and should not be circulated or used for any purpose other than for what it is intended. If you have received this message in error,please notify the originator immediately. If you are not the intended recipient, you are notified that you are strictly prohibited from using, copying, altering, or disclosing the contents of this message. Aricent accepts no responsibility for loss or damage arising from the use of the information transmitted by this email including damage from virus."

------------------------------------------------------------------------------
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.