[plug] .xsession-errors

Russell Steicke r.steicke at bom.gov.au
Thu Dec 2 11:29:45 WST 2004


On Thu, Dec 02, 2004 at 11:12:07AM +0800, Chris Caston wrote:
> Hello,
> 
> I noticed my system drive was reporting 100% full when running df and
> what little space remaining was quickly running out.
> 
> I tried in vain to find out what was writing to the disk but didn't know
> know the commands... I tried fuser -vk /dev/hdc1 (but maybe I was a
> little to late)
> 
> Anyway after doing a little forensics I found .xsession-errors has
> swelled to 20GB. This is a real problem as system resides on a 40gb ide
> drive. I'm only able to use it now because I backed up a lot of stuff to
> a 120gb SATA drive.. (which is now full..)
> 
> Anyway:
> 
> chris at debian:~$ ls -poa .xsession-errors
> -rw-------  1 chris 20307987596 Dec  2 11:06 .xsession-errors
> chris at debian:~$ du -sh .xsession-errors
> 20G     .xsession-errors
> 
> 
> Any idea what what have caused this?

.xsession-errors is created at the start of your X session (strangely
enough) and contains the stdout and stderr from anything run by your X
session (ie anything that is a child of your window manager or
gnome-session or start-kde whatever).  You should have a look in it to
find out which particular program is writing that much info there, so
you know what to avoid next time.  tail would be one way to see what
is writing there at the moment, although it will probably take ages to
read to the end of that file, reading and counting lines along the
way, if it doesn't fail at 2GB.  You could try using less, which
shouldn't try to keep the whole thing in memory so you can look far
enough into the file to see what's going on.

> Should I just rm it and touch a new one?

That won't work, because programs in your X session will still have it
open for writing, so the space won't be freed even though the file
disappears from your home directory.  The only way to get rid of it is
to log out.  It'll be re-created the next time you start an X session,
or you can delete it from the console after your X session is
finished.


-- 
Russell Steicke

-- Fortune says:
Lady Luck brings added income today.  Lady friend takes it away tonight.



More information about the plug mailing list