OSX processor usage

Ethan Galstad nagios at nagios.org
Wed Oct 15 19:44:51 CEST 2008


saggau wrote:
> Hello folks.  Long - time Nagios user.  I hope this is the right place  
> to report a bug + a fix.
> 
> 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.
> 
> Much much longer description here:
> 
> http://www.jonathansaggau.com/blog/2008/09/using_shark_and_custom_dtrace.html
> 
> Cheers,
> Jonathan Saggau

Nice article!  I implemented the patch you suggested.

William's select() patch was also an option, but I seem to remember
there being a bug under Solaris, and/or different Linux distros that
caused the switch to poll().


- Ethan Galstad

-------------------------------------------------------------------------
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