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

Re: A question about logrotate



On Mon, Aug 29, 2005 at 10:39:53AM -0400, Thomas H. George wrote:
> I ran out of space in a 9 Gbyte /var directory, most of the space 
> consumed by debug, kern.log and syslog files.  With a little searching I 
> found the logrotate command and realized these files were being 
> rotated.   In /var/log I found a large (approximately 1 Gbyte) syslog 
> file plus an equally large syslog.0 file and seven syslog.n.gz files 
> where n=1..7.  The same was true of the debug and kern.log files. 
> Examining the /etc/logrotate.conf file I found nothing that corresponded 
> to this rotation scheme so there must be a default somewhere.  To free 
> space I added the following lines to the logrotate.conf file:
> 
> /var/log/debug {
>    missingok
>    daily
>    rotate 1
> }
> 
> /var/log/kern.log {
>    missingok
>    daily
>    rotate 1
> }
> 
> /var/log/syslog {
>    missingok
>    daily
>    rotate 1
> }
> 
> and then ran logrotate -f /etc/logrotate.conf.
> 
> This freed up 3 Gbytes of space but it perhaps is a very crude 
> solution.  As I noted above, the files were being rotated but not 
> according to the logrotate.conf file so there must be a default 
> somewhere.  Where?  Should I try to find and edit it?  Does anyone have 
> a well thought out logrotate.conf file or more detailed information than 
> that given in the man pages?
> 
> I would appreciate any comments or suggestions.
> 
> Tom George

Just a thought: is your machine actually switched on at the time 
logrotate is supposed to do its job?  The default time is about 
six in the morning and on my (home) machine it only performs on 
the odd occasion that I work right through the night.

Cheers,
David

-- 
David Jardine

"Running Debian GNU/Linux and
loving every minute of it."  -L. von Sacher-M.(1835-1895)



Reply to: