Question on timeout of masteragent in agentx++

ansgar.springub____philips.com ansgar.springub____philips.com
Thu Aug 9 15:16:38 CEST 2001


Hi Frank and all,

I am using the agentx++ in our project and got the following problem,

I am using the a masteragent and two subagents. One subagent is a DLL which is running as a thread from our application.
I am checking the status of  the application by sending a SNMP get message to this subagent.

The answering routine get_request(Request* req, int ind)  in the subagent checks the status of all threads in the system and returns a success
integer value.

This works fine with normal load on the system. During our stress test with extremely heavy load we have some problems.

The masteragent give very often the SNMP general error 5 back.

I checked the origin of the error and noticed, that the timeout between the masteragent and the subagent causes the problem.

So I tried a hack in  agentx++\src\agentx_master.cpp and set the timeout value fix to 20 sec.

in
void MasterAgentXMib::process_agentx()
....
instead of
     if ((t = timeout_requests(t)) == 0) {
          timeout = new timeval;
          timeout->tv_sec = 5;
          timeout->tv_usec = 0;
     }
     else {
          timeout = new timeval;
          timeout->tv_sec = t;
          timeout->tv_usec = 0;
     }
use now
     timeout = new timeval;
     timeout->tv_sec = 20;
     timeout->tv_usec = 0;

This solved my problem.

My questions are:

1) Do you think this could cause any other problems or sideeffects?
2) Is there any other way to change the timeout (i.e. by parameter) of the masteragent?


Thanks for your help


Ansgar








More information about the AGENTPP mailing list