What's required for a non-threaded AgentX++ subagent?

Frank Fock Frank.Fock____t-online.de
Tue Apr 29 00:43:54 CEST 2003


James,

Theoretically, it is possible to implement a
single-threaded AgentX++ subagent. However with
the current version, a couple of code modifications
will be needed. Since the master agent relies on
a multi-threaded environment, you will have to
separate any master specific code from the AgentX++
library and remove it.

I will provide the necessary modifications in the
next AgentX++ release on macro definition basis.
The necessary Makefiles will also be provided.

As a quick workaround, you could also use the multi-threaded
library and reduce the ThreadPool size to one. You will
then use POSIX threads but, the subagent will behave as
if it was compiled without threads (single-threaded).

Hope this helps.

Best regards,
Frank

James Brokenbek wrote:
> Frank et al.,
> 
> I've got a working, single-threaded, v3.5.10c Agent++ agent that I now
> want to run as a v1.4.7 AgentX++ subagent "underneath" a v5.0.8 net-snmp
> master agent on FreeBSD 4.3.  I've made the changes in my code
> prescribed by the AgentX++ manual on page 25 (e.g., #includes,
> AgentXSlave usage, etc.) but compilation generates the following errors:
> 
> include/agentx_def.h:31: #error AGENTPP_USE_THREAD_POOL must be defined
> in agent++.h of AGENT++ >= v3.5c
> 
> include/agentx_threads.h:30: #error "To use AgentX++ threads must be
> enabled in AGENT++"
> 
> Since AgentX++ *sub*agents are supposed to support single-threaded
> architectures, I was just going to work around this by changing some of
> the agentx++ includes, but I figured I'd better check first if there was
> a recommended approach to this.  So, is there anything in particular I
> should be doing here?  
> 
> Thanks for your help.  (BTW, the seg fault problem I had a while back
> was due to linking to some stale libraries which I had overlooked.)
> 
> James Brokenbek
> Celion Networks, Inc.
> Richardson, TX USA
> 






More information about the AGENTPP mailing list