LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   /var/log/syslog (https://www.linuxquestions.org/questions/slackware-14/var-log-syslog-159489/)

George666 03-18-2004 01:53 PM

/var/log/syslog
 
My /var/log/syslog is huge (nearly 400 MB), is there some way to limit the size of this thing ? 400 MB for a stupid log file seems a little bit much. Or should I just delete it and recreate it every month or so to keep the size down ?

Tinkster 03-18-2004 02:10 PM

Ummm ... for all I know slack defaults to
using logrotate, which should keep the
logs to a more weildy size ... and you can
then just remove older versions ...

Is logrotate installed on your box?
Code:

grep -l logrotate /var/log/packages/*

Cheers,
Tink


P.S.: For now it should be reasonably safe to
echo /dev/null > /var/log/syslog
(if you're sure there was no intrusion attempt :})

George666 03-19-2004 06:01 AM

logrotate is installed, I'll probably just have to setup a cron job.

ProtoformX 03-19-2004 06:09 AM

Why not just remove the logs? there not needed they just old stuff that has been loged already so what good are they to you?

George666 03-19-2004 07:34 AM

Well all the config files where good, but crontab -l told me
that logrotate job gets done at 4:40 every day (it's in my /etc/cron.daily directory). I'm assuming this is in the middle of the night, seeing that my computer is turned off at that hour, it's no surprise my syslog managed to grow to 400 MB.


All times are GMT -5. The time now is 03:07 PM.