How can I know which files a proccess is accessing?

pete wright nomadlogic at gmail.com
Tue Jun 6 21:39:34 UTC 2006


On 6/6/06, Eduardo Meyer <dudu.meyer at gmail.com> 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.
>

if you can get fstat to help you may want to take a look at lfof,
available in ports:
/usr/ports/sysutils/lsof

"
Lsof (LiSt Open Files) lists information about files that are open by the
running processes.  An open file may be a regular file, a directory, a block
special file, a character special file, an executing text reference, a
library, a stream or a network file (Internet socket, NFS file or Unix domain
socket).
"

-pete
-- 
~~o0OO0o~~
Pete Wright
www.nycbug.org
NYC's *BSD User Group


More information about the freebsd-stable mailing list