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

Re: Controlling kernel log size


Bruno Diniz (<bruno.diniz@gmail.com>) wrote:

> looking into my /var/log, I noticed that kern.log and syslog were
> taking a lot of space. After inspecting this files, I figured out that
> they were keeping 4 weeks of entries. I don't need that much, so how
> can I reduce the number of weeks kept in this logs? I tried to change
> the /etc/logrotate.conf file (rotate 4 -> rotate 2) with no success.

Actually logrotate is set up to rotate the logs weekly (at least
kern.log, on my system syslog seems to be rotated daily), but keep the
old compressed log files for four weeks. It is not quite clear to me if
this is what you meant, because to me it sounds as if the syslog file
in use has entries four weeks old. This should not happen. Maybe the
logrotate cron job is not run because your system is not up 24/7, and
anacron is not installed.

best regards
        Andreas Janssen

Andreas Janssen <andreas.janssen@bigfoot.com>
PGP-Key-ID: 0xDC801674 ICQ #17079270
Registered Linux User #267976

Reply to: