Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 8 Dec 2010 15:52:33 -0800
From:      Garrett Cooper <gcooper@FreeBSD.org>
To:        Matthew Fleming <mdf356@gmail.com>
Cc:        Bruce Cran <bruce@cran.org.uk>, FreeBSD-Hackers <freebsd-hackers@freebsd.org>, Chuck Robey <chuckr@telenix.org>
Subject:   Re: getting a list of open files versus PID nos.?
Message-ID:  <AANLkTimhHkQHayjt51zhai=_Ghz1Tr%2BCYGDw9EexRR=b@mail.gmail.com>
In-Reply-To: <AANLkTi==WtuJgCD7mAEJHgRer-cnzYbVyEEWAkfcsXrd@mail.gmail.com>
References:  <4D000448.1050606@telenix.org> <AANLkTinssm_1rPZ-pPbpGKghDbQfDx29y-y8e-NRSJHo@mail.gmail.com> <20101208230139.2097c2e8@core.draftnet> <AANLkTi==WtuJgCD7mAEJHgRer-cnzYbVyEEWAkfcsXrd@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Dec 8, 2010 at 3:47 PM, Matthew Fleming <mdf356@gmail.com> wrote:
> On Wed, Dec 8, 2010 at 3:01 PM, Bruce Cran <bruce@cran.org.uk> wrote:
>> On Wed, 8 Dec 2010 14:54:57 -0800
>> Matthew Fleming <mdf356@gmail.com> wrote:
>>
>>> This is what lsof is for. =A0I believe there's one in ports, but I have
>>> never tried it.
>>
>> Is there any advantage to using lsof instead of fstat(1) (fstat -p pid)?
>
> I believe that lsof reports on all open files by all processes,
> whereas fstat will only report on a specific provided pid.

    lsof prints out all open file descriptors whereas I thought that
fstat had to be targeted to specific files / directories / vmcore
files / etc.
Thanks,
-Garrett



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTimhHkQHayjt51zhai=_Ghz1Tr%2BCYGDw9EexRR=b>