[PLUG] df shows 33G used, but it does not add up with du

Eric Wilhelm scratchcomputing at gmail.com
Tue Jan 10 16:29:54 PST 2006


# from Robert Anderson
# on Tuesday 10 January 2006 03:28 pm:

>It turns out that a reboot freed up the space that was unaccounted for
> with du. I guess there must have been filehandles open to files that
> had been deleted.

Interesting.  Sounds like you have some misbehaving programs there.  Or 
maybe you were trying to make more disk space and just didn't realize 
they were all running.

For the curious, the following illustrates this (if you don't mind 
deleting all of the line-breaks.)

perl -e 'open(F, ">/tmp/foo-mypid") or die; print F "$$\n"; close(F); 
open(F, "/tmp/foo-mypid") or die; print "$$\n";sleep(10)' & sleep 1; 
export pid=$(cat /tmp/foo-mypid); rm /tmp/foo-mypid; ls 
-l /proc/$pid/fd; ls /tmp/foo-mypid; kill -HUP $pid

--Eric
-- 
I eat your socks and you pay me.
--The business sense of a very small goat.
---------------------------------------------------
    http://scratchcomputing.com
---------------------------------------------------



More information about the PLUG mailing list