[AGENT++] blocking request

Frank Fock fock at agentpp.com
Wed Apr 27 18:59:37 CEST 2005


Hi Enzo,

What you described is normal behavior. If you have an operation
that lasts very long, then you should consider a redesign of your
MIB, for example, informing the manager by an inform request or
notification that the result of an request is available in a result table.

I have thought already about changing the AGENT++ API to use
loocking with timeouts but that does not seem to be portable.

Best regards,
Frank

Enzo Vigano wrote:

>Hi all,
>I'm using Agent++ 3.5.20a and Snmp++ 3.2.13a on a Linux machine (RH9A).
>
>I've tried this kind of "instrumentation code" in a class generated from
>AgenPro:
>
>
>void XXXXXXYYYYYYY::get_request(Request* req, int ind)
>{
>//--AgentGen BEGIN
>int i=0;
>while(i<30){
>sleep(1);
>cout<<"Loop number:"<<i<<endl;
>i++;
>}
>
>//--AgentGen END
>MibLeaf::get_request(req, ind);
>}
>
>I'm doing get request with long Snmp time out.
>I send a get request that starts the loop.
>During the loop I perform any kind of other Snmp request for other OIDs and
>the response comes.
>But if I perform an Snmp get request on the same OID for which I'm already
>waiting the response (Loop above)
>from now on all snmp request on any other OID are blocked untill the loop is
>finished.
>
>
>This is only an example but in my real code I've some "instrumentation code"
>that takes a long time (10/20 secs) to be performed.
>And this "blocking" situation is a problem for my application.
>
>Is this a correct behaviour?
>Can anyone help me?
>Regards.
>Enzo.
>
>
>
>_______________________________________________
>AGENTPP mailing list
>AGENTPP at agentpp.org
>http://lists.agentpp.org/mailman/listinfo/agentpp
>
>  
>





More information about the AGENTPP mailing list