Page 1 of 1

Re: [Nagios-devel] OSX processor usage

Posted: Tue Sep 16, 2008 10:38 pm
by Guest
William Preston wrote:
> Hi Jonathan, hi list
>
> On Sep17, 2008, at 06:26, saggau wrote:
>
>> I ran into a (possible) bug in OS X 10.5.4, which I tracked-down to
>> poll() never timing out in the cmd file worker thread on that
>> platform. It looks like poll() always returns 1, whether there is
>> data on the pipe or not. A quick fix that shouldn't break Nagios on
>> other platforms and which doesn't require any configure checking of
>> poll() is to manually pause if poll() returns 1 with an empty pipe.
>
>
> yes, this is a known problem.
> the continuous polling drives the load to 100%...
>
> I posted a simple patch for this to
> http://blog.netways.de/2008/08/15/nagio ... tallieren/
> (the article is in german, but there is an english comment with the
> patch).
>
> @list:
> I vaguely seem to remember there was a reason why select() isn't used.
>
> Was this a solaris issue?
>

I can't remember, but the issue seemed to be worse with select() than
with poll. I'll make a patch for it that wraps the poll() call and makes
it use select() on systems where that's needed. It's probably about time
we introduce compat.[ch] to Nagios anyways.

--
Andreas Ericsson [email protected]
OP5 AB www.op5.se
Tel: +46 8-230225 Fax: +46 8-230231





This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]