OSX processor usage
Andreas Ericsson
ae at op5.se
Wed Sep 17 08:38:26 CEST 2008
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/nagios-unter-mac-os-x-installieren/
> (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 andreas.ericsson at op5.se
OP5 AB www.op5.se
Tel: +46 8-230225 Fax: +46 8-230231
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
More information about the Developers
mailing list