Logrotating single-issue files
Nicolas Mailhot
Nicolas.Mailhot at laPoste.net
Mon Nov 10 12:51:49 UTC 2003
Le lun 10/11/2003 à 12:40, Harry Putnam a écrit :
> Nicolas Mailhot <Nicolas.Mailhot at laPoste.net> writes:
>
> > The problem is of course once the files have been rotated once nothing
> > will recreate the original files so they'll be stuck in first rotation
> > forever (of course one might tell logrotate to create empty new files
> > after compression but that means filling the disk with empty files -
> > plus gziped empty files are *not* zero-sized anymore).
>
> Investigate the `create', `size' and compress specs in man logrotate.conf
>
> Will something like this in /etc/lograte.conf work?
Size won't help - the size switch means some traces won't ever be
rotated (so instead of having all traces stuck at rotation 1 some of
them will be stuck at rotation 0). And lots of very small files do fill
a partition after a while.
The core problem seems to be you can not tell logrotate to rotate a log
inconditionally, it'll only do it if other versions of the file exist so
to treat a log/trace you have to accept $rotation number of this file
will exist on the disk forever.
When you add the compress+create+ifempty switch in the balance your
$rotation file will each take 31k of disk.
Cheers,
--
Nicolas Mailhot
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Ceci est une partie de message num?riquement sign?e.
URL: <http://listman.redhat.com/archives/fedora-devel-list/attachments/20031110/50438f4d/attachment.sig>
More information about the fedora-devel-list
mailing list