Actually, we decided to solve this problem outside software design
realm.
We had an architectural decision  we can do with an independent "Trap
Sub-Agent", which will only generate traps, it will not
check_and_process.

But still thanks.
I might look at your patch later on.
Erez.
 


-----Original Message-----
From: Dave Shield [mailto:[EMAIL PROTECTED] 
Sent: Monday, February 06, 2006 7:30 PM
To: Makavy, Erez (Erez)
Cc: [email protected]
Subject: Re: Generating traps in Multi-thread Sub-agent: proposed
workaround

    [Can you please *NOT* send messages to both mailing lists.
     It just adds to the support load unnecessarily.  I usually
     delete such messages without responding.  I'm making an
     exception this time because of the subject matter.]


On Thu, 2006-02-02 at 21:31 +0200, Makavy, Erez (Erez) wrote:
> Questions 1
> ------------------
> Is there a multi-thread problem with using send_v2trap() in the main 
> process, while the agent_check_and_process() thread is running?
> (I guess the answer is that there is a problem, because both threads 
> require the same socket for sending agentX PDUs.)

There is certainly a problem with heavily loaded master/subagent
communication running into deadlock.  As with many run-time problems,
the underlying causes are subtle and difficult to pin down.



> Proposed solution
> ---------------------------
> - Open a session over Unix Domain socket (so that the
> agent_check_and_process() will listen on it)
> - my main process will write the trap parameters to that socket.
> - In the callback funciton of that session, instead of parsing an 
> agentX PDU,
>   I'll read the parameters from the socket, and invoke send_v2Trap().

That sounds vaguely similar to an idea I've been toying with for
some time.   Namely, registering *two* AgentX sessions, using
one for "agent-initiated" communication (traps and pings), and the other
for "master-initiated" communication (SNMP requests).

I'm appending a simple patch intended as a provisional implementation
of such an approach.   It's by far from complete, but I'd be
interested in hearing how well it works for you?

Dave



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid3432&bid#0486&dat1642
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to