pcp
[Top] [All Lists]

Re: Don't delete PMCD logs

To: Michael Newton <kimbrr@xxxxxxx>
Subject: Re: Don't delete PMCD logs
From: Nathan Scott <nscott@xxxxxxxxxx>
Date: Fri, 11 Apr 2008 16:24:06 +1000
Cc: pcp@xxxxxxxxxxx, Tim Serong <tserong@xxxxxxx>
In-reply-to: <Pine.SGI.4.58.0804111602040.129086930@snort.melbourne.sgi.com>
Organization: Aconex
References: <Pine.SGI.4.58.0804111602040.129086930@snort.melbourne.sgi.com>
Reply-to: nscott@xxxxxxxxxx
Sender: pcp-bounce@xxxxxxxxxxx
On Fri, 2008-04-11 at 16:07 +1000, Michael Newton wrote:
> Every time pmcd restarts, it starts a new pmcd.log, the old one
> becomes pmcd.log.prev, and the old pmcd.log.prev is lost.
> Many PMDAs do likewise
> 
> This sometimes makes it incredibly difficult to diagnose problems, because
> if you happen to need to restart PCP once or twice while triaging a bug,
> you lose all your logs.  Worse, if you've obtained access to a machine
> well after a problem has occurred, the logs might have all been rotated
> away before you even got there.
> 
> We propose doing away with the ".prev" logfiles altogether, and just
> continually appending to the main log files.  Some "base OS" functionality
> can then be used to rotate the log files as necessary, eg: on SLES, ship a
> logrotate config file for PCP, which by default keeps log files around for
> a long time (weeks/months) and let the logrotate package take care of log
> rotation.
> 
> What thoughts?
> 

Not all platforms have logrotate setup (like Cygwin and
possibly Mac) - so as long as this is optional (maybe
via a runtime tests on -f /etc/logrotate.d/pcp and also
-x `which logrotate`) then this seems OK to me.

cheers.

-- 
Nathan


<Prev in Thread] Current Thread [Next in Thread>