Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 7 Jun 2006 10:57:48 -0300
From:      "Eduardo Meyer" <dudu.meyer@gmail.com>
To:        stable@freebsd.org
Subject:   Re: How can I know which files a proccess is accessing?
Message-ID:  <d3ea75b30606070657wbbc00cesc3b646276591be4@mail.gmail.com>
In-Reply-To: <m3lks9omp0.fsf@merlin.emma.line.org>
References:  <d3ea75b30606061339u55efbecemab0d3d0eb9adb636@mail.gmail.com> <20060606211327.GG32476@bunrab.catwhisker.org> <d3ea75b30606061416i60630419k9505b076edd2f4c7@mail.gmail.com> <m3lks9omp0.fsf@merlin.emma.line.org>

next in thread | previous in thread | raw e-mail | index | archive | help
> > # ps 16543
> >  PID  TT  STAT      TIME COMMAND
> > 16543  ??  S      0:02.43 /usr/local/sbin/httpd -k start -DSSL
> >
> > Any tuning would do the job?
>
> Are you running with tightened up security that might prevent fstat from
> accessing /dev/kmem?  I don't know fstat failures from experience or
> what causes it to just show inode numbers - perhaps delete files that
> are still open.
>
> I'm unsure about the reason for lsof's complaint; if you installed a
> package, try rebuilding the port.
>
> Something different, if fstat and lsof continue to fail: you may try
> attaching a syscall tracer such as truss, ktrace or strace (the latter
> from ports) to the process and see if it leaks file descriptors. This
> may fail due to permissions however.

Hello Matthias,

No, no security measurements prevent lsof from accessing any device.
In fact with lower disk demand (small number of open files) lsof works
fine, but in the situation I need it, when the odd things start to
happen, it doesnt. If a single proccess is opening hundres of files,
lsof fails with the mentioned message.

I have tried 2 different versions from lsof, all built from ports (the
latest and 2 revisions ago with portdowngrade to be sure it is not a
problem that belongs only to the latest version).

fstat doesnt fail under the same workload...

My wish is that fstat had an option to show file name instead of inodes :)

For those who pointed me using find(1) looking for inum from the
output of fstat(1), thank you; it is a very heavy loading option (disk
usage increases around 30% while doing this) but it seemed to be the
interesting option (at least, the options that worded).

Again, thank you everybody who replied.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?d3ea75b30606070657wbbc00cesc3b646276591be4>