[AGENT++] max threads ?

Enzo Vigano enzo.vigano at thalesatm.com
Fri Nov 14 11:32:30 CET 2003


Thank you for the response,
the problem still remains.I've removed all calls to my code in the file
generated by AgentPro and now it's the same as the original one, but the
Agent crashes at the same way.

My loop is:

for (;;) {                // loop forever
        // wait for incoming request max 120 sec
        // and then just loop once
      cout<<"Enter RECEIVE"<<endl;
      req = req_list_->receive(120);
      cout<<"Exit RECEIVE"<<endl;

        if (req) {
            cout<<"Enter PREOCESS REQ"<<endl;
            mib_->process_request(req); // process the request
            cout<<"Exit PROCESS REQ"<<endl;
        }
  }


Can you tell me what I have to do to enable agent++ LOGGING?
I've //#define _NO_LOGGING  in agent++.h.
and I have
	DefaultLog::log()->set_filter(ERROR_LOG, 15);
	DefaultLog::log()->set_filter(WARNING_LOG, 15);
	DefaultLog::log()->set_filter(EVENT_LOG, 15);
	DefaultLog::log()->set_filter(INFO_LOG, 15);
	DefaultLog::log()->set_filter(DEBUG_LOG, 15);
but nothing appears.

Thank you in advance.
Ciao.





-----Original Message-----
From: agentpp-admin at agentpp.org [mailto:agentpp-admin at agentpp.org]On
Behalf Of Frank Fock
Sent: mercoledi 12 novembre 2003 20.03
To: enzo.vigano at thalesatm.com
Cc: agentpp at agentpp.org
Subject: Re: [AGENT++] max threads ?


Hi Enzo,

By default, AGENT++ uses a thread pool of four threads. Thus,
four requests can be simutaneously processed. A fifth request
would be wait until the first of the four has been finished.
In fact the upper limit of concurrent requests is only defined by
the size of your UDP buffer.

When your agent crashes because of concurrent requests, then
you probably have a synchronization weekness in your instrumentation
code. Although AGENT++ does most of the locking for you, you
need to be careful when implementing code that accesses other
MIB objects in agent other than that from which your instrumentation
code has been called.

Hope this helps.

Best regards,
Frank

Enzo Vigano wrote:

>Hi everybody,
>I'm using an agent based on AGENT++v3.5 on linux Rh9 and it crashes when it
>process at the same time more than one get request (sent by westhawk 4.13
>stack ).
>It has been built as multi-threaded agent. With single get request all ok.
>Any idea or does anybody know if there is a max threads requests that can
be
>processed simultaneously?
>Thank you .
>Ciao.
>
>
>
>
>_______________________________________________
>AGENTPP mailing list
>AGENTPP at agentpp.org
>http://agentpp.org/mailman/listinfo/agentpp
>
>
>



_______________________________________________
AGENTPP mailing list
AGENTPP at agentpp.org
http://agentpp.org/mailman/listinfo/agentpp




More information about the AGENTPP mailing list