You are not logged in.
Pages: 1
Hi all,
I was trying to download sth with firefox and it was telling me /tmp was full. So I had a look: my / partition is 19G and it was filled up! It turns out that /var is using 7G~ of space almost entirely by 4 files:
-rw-r----- 1 root log 1.9G 2008-11-04 09:02 /var/log/errors.log
-rw-r----- 1 root log 1.9G 2008-11-05 20:32 /var/log/everything.log
-rw-r----- 1 root log 1.8G 2008-11-05 20:32 /var/log/kernel.log
-rw-r--r-- 1 root root 1.6G 2008-11-05 22:03 /var/log/slim.log
Any idea why? Can I safely remove them?
Offline
Any idea why? Can I safely remove them?
yes you can if you are sure you don't need them anymore. Maybe a good idea to add crond to your daemons which runs logrotate every day by default (if installed of course).
Last edited by pressh (2008-11-05 22:11:47)
Offline
It might also be a good idea to find out why errors.log is so big. Yikes.
And yes, logrotate is made to solve exactly this problem (giant logfiles)
Offline
hmmm. From looking briefly at the errors.log, it looks like it's been written to for at least over a full year (might be multiple years). Suppose it was created when Arch was first installed. Also a lot of duplicated lines that happens within a min. But 2G text file is still amazing. Anyways, I'll be brave and remove them.
logrotate requires a bit training
Thanks,
Offline
logrotate comes with some very sane defaults. You should be able to pretty much just do `pacman -S logrotate` and it will do a satisfactory job
Are you familiar with our Forum Rules, and How To Ask Questions The Smart Way?
BlueHackers // fscanary // resticctl
Offline
unfortunately (but, perhaps it's a feature ) logrotate doesn't come with a 'maximum logsize' preset. You can hose your PC by inserting a wrong burned dvd and 'everything.log' will start growing without roof. My two cents here are to set 'size 20M' (or whatever your prefer) into /etc/logrotate.conf and dump unused logs after 4 o 5 rolls.
They say that if you play a Win cd backward you hear satanic messages. That's nothing! 'cause if you play it forwards, it installs windows.
Offline
4 or 5?
# rotate log files weekly
weekly
# keep 1 year of backlogs
rotate 52
:D:D
Last edited by fukawi2 (2008-11-06 02:26:33)
Are you familiar with our Forum Rules, and How To Ask Questions The Smart Way?
BlueHackers // fscanary // resticctl
Offline
If you're concerned about space on /var, you'll love this:
compress
compresscmd bzip2
uncompresscmd bunzip2
compressext bz2
Add that to logrotate.conf and your old logs will be bzipped. Remember to install lesspipe for easy viewing. If you're really strapped for space, consider trading tool support for size and upgrade to lzma (from the lzma-utils package).
Offline
That's a nice reminder for me to take a shot at a sane syslog config. I hate everything.log with a passion.
1000
Offline
logrotate is run from cron every night. If you only use your laptop during daytime, cron will never run logrotate and your logs keep filling up.
Offline
logrotate is run from cron every night. If you only use your laptop during daytime, cron will never run logrotate and your logs keep filling up.
yes but that is easy to change. I wrote a small thing about crond some time ago for the newsletter if someone wonders howto.
Offline
Also, look at this script: http://bbs.archlinux.org/viewtopic.php?id=57973
Offline
Pages: 1