[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: monit uptime

From: martin rueegg [metaworx rueegg]
Subject: RE: monit uptime
Date: Thu, 18 Aug 2005 17:40:43 +0200

> On Behalf Of Jan-Henrik Haukeland
> Sent: Donnerstag, 18. August 2005 14:46

> >>> the daemon uptime in ''monit summary'' or on the
> >>> webinterface seems to be the one of the webserver
> >>> and not the one of the deamon process itself.
> Yes, that is true. The reason is, a) monit compute the uptime simply  
> by looking at the creation time of its own pid file. b) during a  
> reload, monit recreate its own pid file so the timestamp is changed.  
> c) The pid file is recreated because the location of the pid 
> file may have been changed after a reload.
> As the discussion above demonstrate the uptime of the monit process  
> can be "wrong".

ok, thanks for the explanation.

> Although I'm not convinced that this particular situation is so serious 

no, it isn't serious at all.

> that we should throw away the current KISS  
> solution and implement it otherwise.

no, only if it would be easy to implement. one approach could be the way,
that the pid file is recreated unless it already exits and contains the
current pid.

that might be quite easy but would reqire to
a) test file existence
b) optionally check file length to be the same than length(pid)
c) open file, read file content, close file, compare content with current
if one test fails, the file is recreated.

well, if you feel doing it, fine. else: no worry. maybe I can try to do a
patch after having me orientated in the code (if apreciated).


reply via email to

[Prev in Thread] Current Thread [Next in Thread]