check_procs on Solaris fails sometimes

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
jwinkle
Posts: 2
Joined: Thu Oct 17, 2013 1:14 pm

check_procs on Solaris fails sometimes

Post by jwinkle »

On Solaris, check_procs uses pst3 instead of /bin/ps (see http://nagios-plugins.org/doc/faq/ps-on-solaris.html for background). There's a small bug in pst3 which causes it to NOT report some processes that are at the end of the process table, at least on very busy systems (we noticed this on a CoolThreads T5240 with load averages up to 90).

The bug is that a filehandle is not properly closed. See http://tracker.nagios.org/view.php?id=658 for the patch.
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: check_procs on Solaris fails sometimes

Post by sreinhardt »

Considering this is not actually a Core issue, but an issue with plugins, could I ask you to post on our github at: https://github.com/nagios-plugins/nagios-plugins/issues
Otherwise, I will do my best to remember to check this. You might also check the 2.1 beta branch and see if that resolves any of your issues, instructions can be found here: http://support.nagios.com/forum/viewtop ... 35&t=30546
Finally, is your patch for internal solaris code, or code included with plugins, I don't recall seeing a pst3.c anywhere in our source.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
jwinkle
Posts: 2
Joined: Thu Oct 17, 2013 1:14 pm

Re: check_procs on Solaris fails sometimes

Post by jwinkle »

I posted on github at https://github.com/nagios-plugins/nagio ... /issues/64

pst3.c is code included with plugins:
-rw-r--r-- 1 jwinkle jwinkle 7099 Mar 4 2014 nagios-plugins-2.0.3/plugins-root/pst3.c
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: check_procs on Solaris fails sometimes

Post by sreinhardt »

Cool thanks! I'll look into adding it to the plugins beta
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
Locked