Root filesystem full: /var/log > 1.8 GB

Smoot Carl-Mitchell smoot at tic.com
Mon Oct 13 19:23:09 UTC 2008


On Mon, 2008-10-13 at 20:37 +0200, Dotan Cohen wrote:
> 2008/10/13 Hal Burgiss <hal at burgiss.net>:
> > On Mon, Oct 13, 2008 at 08:10:24PM +0200, Dotan Cohen wrote:
> >> What is safe to rm in /var/logs? I don't know if there is a problem
> >
> > cat /dev/null > /var/log/$some_log
> >
> > That will keep the file descriptor in place so that logging continues.
> >
> 
> Thanks, good idea.
> 
> What is the right way to determine what is filling up a log file, if I
> don't even know which log file is being filled? I don't yet know what
> the problem is, but I need to discover it fast. I am unfamiliar with
> the files in /var/log so I would not know to identify a problem.

The logs get rotated periodically.  Old logs are compressed, so you can
do:

cd /var/log
ls -l *.gz

and see how much space the old logs take up.  You can delete these files
safely with "rm".  You can see the total space taken by all the logs by
running:

sudo du -s
-- 
Smoot Carl-Mitchell
System/Network Architect
smoot at tic.com
+1 480 922 7313
cell: +1 602 421 9005




More information about the ubuntu-users mailing list