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
|