The question was "how do I track down open files, and which processes
have them open".
Thanks to all who responded. Overwhelming vote was for 'lsof'.
Here is one example from Guy Evans, who helpfully included the relevant
chunks of the lsof FAQ for me.
'lsof' compiled up just fine on 3.1 and 3.2, and works like a champ.
-- hugh
---------- Forwarded message ----------
Date: 23 Jan 1996 10:46:02 +0000
From: Guy Evans <Guy.Evans_at_brunel.ac.uk>
To: Hugh Messenger <hugh_at_foo.garply.com>
Subject: Re: Tracking down a "disk leak"
>>>>> "Hugh" == Hugh Messenger <hugh_at_foo.garply.com> writes:
Hugh> AlphaServer 1000, 3.2, running INN 1.4. About 3 weeks ago, our
Hugh> AS1000 news box started growing an Invisible Thing on the
Hugh> /usr/local/news partition. A df will show (say) 600Mb userd, but
Hugh> a du will show the ("real") (say) 180Mb used. Rebooting the
Hugh> machine reclaims ithe space.
Hugh> Something somewhere is not letting go of an inode. On SunOS I
Hugh> would be using pstat to track down processes with inodes open on
Hugh> that partition.
Easiest thing is to probably install 'lsof' (LiSt Open Files...). Be sure
to get a recent version.
1.2 Where do I get lsof?
Lsof is available via anonymous ftp from vic.cc.purdue.edu
(128.210.15.16). Look in the pub/tools/unix/lsof sub-
directory.
Compressed and gzip'd tar files with PGP certificates are
available.
1.2.1 Are there mirror sites?
The lsof distribution is currently mirrored at:
cert.org:
pub/tools/lsof/
coast.cs.purdue.edu
pub/tools/unix/lsof
ftp.cert.dfn.de:
/pub/tools/misc
ftp.cs.columbia.edu:
archives/lsof/
ftp.fu-berlin.de:
pub/unix/tools/lsof
ftp.gre.ac.uk:
pub/tools/lsof
ftp.sterling.com:
mirrors/sites-01/vic.cc.purdue.edu/pub
ftp.sunet.se:
pub/unix/admin/lsof
ftp.tau.ac.il:
/pub/sources/admin
Guy
Received on Tue Jan 23 1996 - 21:18:27 NZDT