nohup and check_nrpe and timeout

David Shapiro David.Shapiro at sas.com
Fri Dec 5 19:36:08 CET 2008


Okay, I tried to compile the setsid.c, but it wanted nls.h.  I tried to get nls.h, and it wanted types.h, etc etc.  I searched around for a version for Solaris, which is what I am using, but I had no luck.  I ended up abandoning this idea and tried the check_by_ssh, and this worked fine, so I am good for now I think.  The one thing I am not certain about is the comment that when you use the -f option, to disassociate the process from a tty, it says something like if ssh is successful it always returns a success.  Is it trying to say that it will ignore my exit codes if I use the -f option?!?  That will not work for me if that is the case.

Anyway, Thomas,you are absolutely great with passing me this information.  I highly appreciate the fact you stepped up and did so.  I wish you happy holidays and the best in case I do not hear back from you.

David

-----Original Message-----
From: Thomas Guyot-Sionnest [mailto:dermoth at aei.ca] 
Sent: Friday, December 05, 2008 9:14 AM
To: David Shapiro
Cc: nagios-users at lists.sourceforge.net
Subject: Re: [Nagios-users] nohup and check_nrpe and timeout

On 05/12/08 08:37 AM, David Shapiro wrote:
> Thank you Thomas, this looks like good info.  I do not seem to have an executable on Solaris called setsid though.  It is listed as a c function.  Nrpe.cfg does in fact let you increase the timeout, but I was thinking that will not help because my program remains running in a loop.  Re-iterations has it check logs that it is generating.  If it is not seen as running, I mentioned that it will just start it again.  However, since it is in a loop, I am thinking that nrpe will timeout no matter how much my timeout is set to.  The setsid idea looked interesting, but unfortunately I do not see it on my server.  The last one I think was using bash to close stdout, stdin, and stderr, but it also used setsid in your example (sigh).  The alarm handle idea did not work.  That leaves the ssh check a
 gent.  I will look into that today.
> 

Try this maybe...

http://www.google.com/codesearch?hl=en&q=linux+setsid.c+show:SQhth2SDUWk:_rHMxvw0UiI:7BWeGpnuS2M&sa=N&cd=5&ct=rc&cs_p=ftp://ftp.kernel.org/pub/linux/utils/util-linux/testing/util-linux-2.13-pre7.tar.gz&cs_f=util-linux-2.13-pre7/sys-utils/setsid.c

-- 
Thomas


------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list