A question about logrotate
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
Reply to: