State Rentention thoroughly messed up

Chris Wilson chris at aidworld.org
Tue Jul 26 12:18:34 CEST 2005


Hi all,

Yet another case of multiple Nagios processes. Nagios has a lockfile
which is supposed to prevent this, but apparently it doesn't work.

Looking in base/util.c of Nagios 1.2, I see that it tries to use fcntl
locking to enforce exclusive access to the lockfile. It doesn't seem to
be working, at least on some platforms. Nagios doesn't check whether the
PID in the lockfile, if it already exists, points to a different
process. I think it should do so, as an additional check.

Please could developers look at the attached patch (not tested) to see
if it looks reasonable? 

Cheers, Chris.

On Mon, 2005-07-25 at 20:18, Justin Shore wrote:
> Excellent call!  Looking at my process list I see that I have two sets of Nagios slaves running.  I'm not sure if something died along the way or if it was a init script flub.  Either way I'll be modding my init script to detect this condition before it actually starts the next set of Nagios slaves.  It's working like a champ now.
> 
> Thanks
>  Justin
> 
> 
> > -----Original Message-----
> > From: Lori Adams [mailto:ladams at cloudmark.com]
> > Sent: Monday, July 25, 2005 2:01 PM
> > To: Justin Shore; nagios-users at lists.sourceforge.net
> > Subject: RE: [Nagios-users] State Rentention thoroughly messed up
> > 
> > You may have multiple instances running.  Make sure there's only one.
> > 
> > -Lori
> > 
> > 
> > -----Original Message-----
> > From: nagios-users-admin at lists.sourceforge.net
> > [mailto:nagios-users-admin at lists.sourceforge.net] On Behalf Of Justin
> > Shore
> > Sent: Monday, July 25, 2005 11:50 AM
> > To: nagios-users at lists.sourceforge.net
> > Subject: [Nagios-users] State Rentention thoroughly messed up
> > 
-- 
(aidworld) chris wilson | chief engineer (chris at aidworld.org)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: nagios-lockfile.patch
Type: text/x-patch
Size: 1550 bytes
Desc: not available
URL: <https://www.monitoring-lists.org/archive/users/attachments/20050726/6b8ea2a6/attachment.bin>


More information about the Users mailing list