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

Re: Logrotating single-issue files



Le lun 10/11/2003 à 12:40, Harry Putnam a écrit :
> Nicolas Mailhot <Nicolas Mailhot 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

Attachment: signature.asc
Description: Ceci est une partie de message=?ISO-8859-1?Q?num=E9riquement?= =?ISO-8859-1?Q?_sign=E9e=2E?=


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