Subject: Re: Log rotation
To: Greywolf <greywolf@starwolf.com>
From: Luke Mewburn <lukem@NetBSD.org>
List: current-users
Date: 02/26/2005 09:42:17
--cHMo6Wbp1wrKhbfi
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

On Fri, Feb 25, 2005 at 01:20:32PM -0800, Greywolf wrote:
  | What could be useful as far as logging is some way to allow a "backlog",
  | much like is done with databases or filesystems (what's the difference,
  | really) when you take checkpoints (aka "hot backups") -- you freeze the
  | current state, copy/move it, then you unfreeze it and let it pick up from
  | where it left off.  In the case of logging, the extra step of closing and
  | reopening all the file descriptors (according to the configuration) would
  | come into play.

logrot almost supports that; there currently isn't support for an
optional command to perform _before_ rotation, and it always moves
(renames) the files rather than copy.  So, you could do
	freezecmd
	logrot -s 0 -w 60 -N 'unfreezecmd' files
		# (don't send a signal, wait 60 seconds after rotation,
		# use unfreezecmd to notify the app)


Cheers,
Luke.

--cHMo6Wbp1wrKhbfi
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (NetBSD)

iD8DBQFCH6nJpBhtmn8zJHIRArieAJ0aoZ1x9oeXNhj1FLnl/3gu5aZ4ZwCfZllS
hjpe/GZoEF80ksS2jtUDdDg=
=OTXW
-----END PGP SIGNATURE-----

--cHMo6Wbp1wrKhbfi--