Yes there is.
It should be set up already by default, but in my system a misconfiguration
was preventing it working. Maybe you have a similar issue.
The application that checks all the log files daily is called logrotate
It is called up as a cron job
If you look in /etc/cron/daily you should see a script called logrotate
The actions of logrotate are controlled by the files in /etc/logrotate.d
There will be a file for each logfile being managed by logrotate.
If you open up the /etc/logrotate.d/syslog file a section of mine looks like
this.
/var/log/auth.log {
rotate 5
weekly
postrotate
/usr/bin/killall -HUP syslogd
endscript
}
/var/log/syslog {
rotate 5
weekly
postrotate
/usr/bin/killall -HUP syslogd
endscript
}
There is a stanza for each log file and the parameters indicate how many back
up archives will be kept, how often they should be made, and the maximum size
of the log file before a new back up is made. Consult 'man logrotate' for a
full breakdown of the parameters.
The problem I had is that there were two stanzas for the same file in this
list, and that stopped logrotate in its tracks, and it did not rotate logs at
all.
Hope that helps.
derek
On Saturday 19 January 2002 09:05, Daniel Chen wrote:
> I have a question about the log file.
> I have run my Mandrake Linux for 2 weeks and I found the syslog and
> other log files have become larger and larger.
>
> Is there any way I can limit the size of these log files and make it
> automatically cut the beginning part when it over the size limit?
>
> Thank you!
>
> Daniel
Want to buy your Pack or Services from MandrakeSoft?
Go to http://www.mandrakestore.com