Hi All,

In my subagent code , I registered a call back function do_alarm() which
handles the events using snmp_alarm_register() .
As per my understanding from the snmp_alarm_register() code, the call back
function once called should be called again only after 5 sec.
But from the logs I could see that its called repetitively without giving
chance to agent_check_and_process().

 snmp_alarm_register (5 , SA_REPEAT, do_alarm, NULL);
 while (keep_running) {
     snmp_log(LOG_INFO, "Before agent_check_and_process \n");
       rc = agent_check_and_process (1);
      snmp_log(LOG_INFO, "After agent_check_and_process \n");
 }

void
do_alarm (unsigned int clientreg, void *clientarg)
{
// do_alarm: Entry

//event handling routines

//do_alarm: Exit
}

==============
Jan  9 04:57:42  Subagent[28973]: Before agent_check_and_process
Jan  9 04:57:42  Subagent[28973]: After agent_check_and_process
Jan  9 04:57:42  Subagent[28973]: Before agent_check_and_process
Jan  9 04:57:47  Subagent[28931]: do_alarm: Entry.
Jan  9 04:57:47  Subagent[28931]: Polling mechanism found an event.
Jan  9 04:58:09  Subagent[28931]: do_alarm: Exit  .
Jan  9 04:58:09  Subagent[28931]: do_alarm: Entry.

Please let me know if there's any problem with my current implementation of
subagent.

Thanks & Regards,
Eswar
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2d-oct
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Reply via email to