You are not logged in.
Pages: 1
I installed arch a couple of years ago and thought that I left ample room for the root directory. I have been getting warning messages that the space was low on this directory (/home is on seperate directory).
This is the result of # du -hs on the directories in root:
11M /etc
120M /lib
16K /lost+found
150G /media
4.0K /mnt
499M /opt
46M /root
8.5M /sbin
12K /srv
0 /sys
88K /tmp
4.3G /usr
7.1G /var
The /var/log directory is 6.8G in size. There are 3 files in /var/log called everything.log, kernel.log, and errors.log. Each of those files is 2.2 GB in size. Can I get rid of all the files in the /var/log directory or maybe just the 3 huge log files? Please advise. Thanks.
Last edited by cool_arrow (2010-10-20 19:27:02)
Offline
man pacman, look for -Sc and -Scc. (the pkg cache is kept in /var)
also look into logrotate to archive old logs else place (6.8G ?!) on a weekly basis
Last edited by brisbin33 (2010-10-20 16:54:32)
//github/
Offline
I have done #pacman -Sc and #pacman -Scc already. It didn't seem to help.
Offline
for f in everything.log kernel.log errors.log; do >/var/log/$f; done
Offline
Still your /var is a whopping 7 GB. Partitioning guides routinely recommend 3 GB if you swap out /var. Have you done ever any maintenance on that system - at all?
We'd also need to see your fstab so we get an idea what partition layout you're having; for all we know you might have split out every dir in /. However, for starters, if you contain /media a little, you'll have ample room already .
Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy
Offline
Sorry perbh but I don't understand that command.
for f in everything.log kernel.log errors.log; do >/var/log/$f; done
Offline
/usr/sbin/logrotate /etc/logrotate.conf
Offline
he's basically saying just wipe the logs... i think logrotate is a better solution.
hey - logrotate doesn't _free_ any space as such (unless I'm terribly mistaken - which may well be the case), when used as a cron-job it just ensures a certain amount of 'break-up' and will over time be a good tool. I don't think it's any help for a one-time effort - if you have a process that's going wild and writing masses to one or more log-files - 'logrotate' ain't gonna help you none.
Offline
I just deleted the offending gigantic log files and they were recreated and are small now. I guess I should really read them and figure out why they are so huge but no time to do that right now. Thanks guys.
Offline
They fill over time - that's what they do. If they'd swell to gigabytes in a matter of weeks, then something is wrong, but that doesn't seem to be the case here. You should just set up logrotate, that will prevent the logs from growing big - if you enable rotation and compression, that is. If you're looking at a few GB to shave off though, maybe you should be looking for an extra HD (or a bigger one to replace this one with).
Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy
Offline
Pages: 1