How can I know which files a proccess is accessing?
Wilko Bulte
wb at freebie.xs4all.nl
Tue Jun 6 21:36:22 UTC 2006
On Tue, Jun 06, 2006 at 02:14:01PM -0700, Clint Olsen wrote..
> On Jun 06, Eduardo Meyer wrote:
> > 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.
>
> Linux has a cool program: lsof (list open files). Does FreeBSD have
> something similar?
The same:
wb at freebie ~: pkg_info | grep lsof
lsof-4.76.2 Lists information about open files (similar to fstat(1))
see: /usr/ports/sysutils/lsof
--
Wilko Bulte wilko at FreeBSD.org
More information about the freebsd-stable
mailing list