[Tfug] disk usage mystery..

John Gruenenfelder jetpackjohn at gmail.com
Mon Mar 5 21:53:06 MST 2012


On Mon, Mar 5, 2012 at 21:30, JD Rogers <rogersjd at gmail.com> wrote:
> John, from what you know, do these files get released when the program
> is closed? I was just killing off programs and processes to see if I
> could find one that gives me disk back, but so far nothing I've found
> helps (except reboot). Which, unfortunately, I just did, so I can't
> try Ian's suggestion yet.

Yes, when a process exits, in any manner, the OS will take care to
close any files it may have had open.  If these files have no further
links on the file system, they are deleted.

>> Presumably 'lsof | grep "(deleted)"' when disk usage is high will show
>> such files (and, conveniently, the processes with the open links). I had
>> a similar disk-usage problem situation recently (fixed by changing a
>> script's configurable tmpdir), but didn't make the connection.
>
> I'll try that as soon as I see my free space plummet. At ten minutes
> after reboot, I have 19 of  of these deleted files, mostly gvfs
> related. Not sure that isn't normal.
>
>>
>> On my system I get a number of false positives here that actually exist
>> (e.g. /usr/bin/xinit, which clearly still exists on my system!).
>> However, it's pretty easy to check if you can see a given file.

Oh yes, I forgot all about lsof.  My system has been on for 1h30m and
I have 20 deleted opened files listed.  Three are related to X
processes, like Xorg, but lsof says that the "file" refers to the
executable's "text" data segment.  Perhaps this has something to do
with reading symbols for module loading, or some such.  Most of the
rest are actual (tiny) temp files and a couple of log files.  There
are also a handful of Apache SSL mutex files listed, but they don't
contain any data.


-- 
--John Gruenenfelder    Systems Manager, MKS Imaging Technology, LLC.
Try Weasel Reader for Palm OS  --  http://weaselreader.org
"This is the most fun I've had without being drenched in the blood
of my enemies!"
        --Sam of Sam & Max




More information about the tfug mailing list