You are not logged in.
Pages: 1
Ok /var/logs is filling up at an alarming rate... need to sort it out
[off to check wiki]
9.3g is waay too much!!!!
Help!
Mr Green
Offline
logrotate?
Offline
emmm yes..../me searches thanks ;-)
Mr Green
Offline
May need some help to set it up... got logrotate installed .....
Mr Green
Offline
Offline
And similar question. It is normal just to do:
cd /var/logs
rm -r *
? Or it is bad idea?
Offline
Are you starting the crond daemon? And is you computer powered when it's running? If your computer is shut down most of the time, you might want to try anacron in community.
ProzacR: I guess you could but using logrotate is better as you don't lost the recent information that has been added to the logs.
Offline
And similar question. It is normal just to do:
cd /var/logs
rm -r *
? Or it is bad idea?
Bad idea.
Offline
If you've got a large log, check what's causing the size. If it's nothing important, you're fine to remove it, though it might be a good idea to create an empty file in it's place. I wiped out a few the other day, didnt hurt.
Offline
# rm /var/log/*.{old,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20}
Last edited by schivmeister (2008-01-24 13:35:23)
I need real, proper pen and paper for this.
Offline
# rm /var/log/*.{old,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20}
1) logrotate must be working to get *.log.X.gz (if compression enabled), or *.log.X
2) usually logrotate puts these in /var/log/archive (unless something else specified)
so you will not have anything in /var/log/*.log.X
3) if logrotate is not configured only working log file is present (and growing without any limit imposed)
you can run logrotate at any time manually.
1) configure /etc/logrotate.conf
- uncomment
olddir /var/log/archive
make sure that /var/log/archive is created
- uncomment
compress
save run (root privileges)
/usr/sbin/logrotate -f /etc/logrotate.conf
now configure cron to run the above (configure periodic log rotation in logrotate.conf)
do not try to rm .log files, mess up syslog, some are in use, this is really brutal method.
Offline
in use? *.x are at least a month old on my system, hah! pacman.log itself goes back 05/03/07
I need real, proper pen and paper for this.
Offline
Ok so I need to create a config file
/var/log/wtmp {
monthly
create 0664 root utmp
rotate 1
}
As an example... I need one to rotate kernel everything and errors ? crond is set in rc.conf so....more run it every week...
Mr Green
Offline
if you leave default settings for log rotation logrotate will archive:
access.log
auth.log
daemon.log
errors.log
everything.log
iptables.log
kernel.log
messages.log
user.log
and whatever daemon will use logs.
no need to add Xorg.0.log or logfiles that behave similarly.
Offline
in logrotate.d I have
more syslog-ng
/var/log/messages.log /var/log/auth.log /var/log/mail.log /var/log/kernel.log /v
ar/log/errors.log /var/log/daemon.log /var/log/user.log /var/log/iptables.log /v
ar/log/everything.log /var/log/syslog.log /var/log/acpid.log {
missingok
sharedscripts
postrotate
/bin/kill -HUP `cat /var/run/syslog-ng.pid 2>/dev/null` 2> /dev
/null || true
endscript
I figure I must do some more reading up...
Mr Green
Offline
Pages: 1