How can I know which files a proccess is accessing?
Wilko Bulte
wb at freebie.xs4all.nl
Tue Jun 6 21:26:10 UTC 2006
On Tue, Jun 06, 2006 at 05:39:34PM -0300, Eduardo Meyer wrote..
> Hello,
>
> I need to know which files under /var a proccess (httpd here) is
> acessing. It is not logs because I have a different partition for
> logs.
>
> gstat tells me that slice ad0s1h (my /var) is 100% frequently, and in
> fact with fstat I can see a number of httpd proccesses running
> accesing that. But fstat only shows me inodes and the mount point.
>
> I need to know which files the proccesses are acessing.
lsof?
$ lsof /var
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
mutt 8018 wb 4r VREG 0,172 163763 47112 /var/mail/wb
sh 8024 wb 4r VREG 0,172 163763 47112 /var/mail/wb
vi 8025 wb 4r VREG 0,172 163763 47112 /var/mail/wb
sh 8031 wb 4r VREG 0,172 163763 47112 /var/mail/wb
$
--
Wilko Bulte wilko at FreeBSD.org
More information about the freebsd-stable
mailing list