Possible bug in Nagios 2.12?

Thomas Guyot-Sionnest dermoth at aei.ca
Fri Apr 17 23:00:23 CEST 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Steven D. Morrey wrote:
>> That's a very good idea (replacing sleep(1) with sched_yield()). Just
>> make sure it keeps on working on AIX and Solaris and stuff like that,
>> where Nagios compiles and runs just fine today.
> 
>> I'd prefer if you did it with a helper function to make it easier to
>> support various operating systems that need it without duplicating a
>> lot of code.
> 
> I've attached a patch and am seeking comments.
> It won't cure cancer but if you do have non-parallel checks it may reduce your overall latency :)

I looked at the sched_yield() man page and found the following statement:

POSIX systems on which sched_yield() is available define
_POSIX_PRIORITY_SCHEDULING in <unistd.h>.

That would make is work on more systems. My Solaris 10 server has it.


BTW, haven't looked deeply at the issue but my other post about
semaphores could be based on a wrong understanding of that issue - I
thought nagios was sleeping until all checks are done to run an
unparalized check, though it seems to be broader than that.

- --
Thomas
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFJ6O3n6dZ+Kt5BchYRAtCWAKCQ9l4d4IS/IIEghtDApZ/ILgCATgCgj1co
YmKGy6Vv6anrq1nbJrUqkRI=
=MouZ
-----END PGP SIGNATURE-----

------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p




More information about the Developers mailing list