Possible bug in Nagios 2.12?

Andreas Ericsson ae at op5.se
Thu Apr 9 00:21:03 CEST 2009


Steven D. Morrey wrote:
> <snip>
> Ah, no.  The really sensible thing to do would
> be to wait only until all the blocking checks
> are done (either just one of "too many", or
> all other checks in the parallelization case).
> Sleeping for a full second regardless of when
> the blocking checks complete can waste time
> between when the next plugin could run and
> when it actually does.  And with enough checks
> introducing these extra arbitrary delays, the
> overall latency for the full set of checks can
> easily creep up.
> </snip>
> 
> 
> Thats a good point, so the better thing might be to move that check to the end of the event_list and move the even_list right along.
> I have some experimental code I'm working with.
> If you put it in above the place where it goes to sleep, it should unblock the queue and let the other checks run.
> 

That's a bad idea, as it would mean checks that can't be
parallelized are likely to *never* run.

> 			    //Move this event to the end of the queue so it doesn't block
> 			    if(event_list_low->event_type==EVENT_SERVICE_CHECK)
> 			    {
>                     timed_event *this_event = temp_event = event_list_low;
>                     event_list_low = event_list_low->next;
> 
>                     while(temp_event->next)
>                     {
>                         temp_event = temp_event->next;
>                     }
> 
>                     temp_event->next = this_event;
>                     this_event->next = NULL;
> 
> 			    }
> 
> In my sources I placed it at about line 1112 or 1113 in events.c but YMMV
> since my sources have some extra patches and stuff in them that may have
> shifted the line numbers.
> 
> Let me know what you think.
> 

I think that sending raw code without context is a really dumb idea if you
want others to actually review your code.

Send a proper patch in unified diff format against the vanilla sources of
a released nagios version if you actually want input besides the brief
comment I gave above. Don't forget to mention the version, please.

-- 
Andreas Ericsson                   andreas.ericsson at op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231

Considering the successes of the wars on alcohol, poverty, drugs and
terror, I think we should give some serious thought to declaring war
on peace.

------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com




More information about the Developers mailing list