Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 09 Dec 2010 15:55:08 -0500
From:      Chuck Robey <chuckr@telenix.org>
To:        freebsd-hackers@freebsd.org
Subject:   Re: getting a list of open files versus PID nos.?
Message-ID:  <4D01422C.9080206@telenix.org>
In-Reply-To: <AANLkTin=DkOJ8oafoGcQNZxWZ50P8533PmkSgPLmT%2BgU@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>	<4D0020D7.5080706@freebsd.org> <AANLkTin=DkOJ8oafoGcQNZxWZ50P8533PmkSgPLmT%2BgU@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 12/09/10 06:49, krad wrote:
> On 9 December 2010 00:20, Andriy Gapon<avg@freebsd.org>  wrote:
>
>> on 09/12/2010 01:47 Matthew Fleming said the following:
>>> 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.  I 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.
>>
>> Just try running fstat without any options.
>> Or procstat -a -f.

Ahh, the procstat -a -f output was more clearly readable than even the suggested 
lsof.  I found that enlightenment was opening 2,672 different
/dev/apmNNNN devices.  Man apm tells me it's to do with Advanced Power Mgm't, 
nearly all of these huge lumps of open files.  How might I deal with getting 
these /dev/apmNNNN files to close themselves?  Because I have little doubt that 
I am (at last!!) looking at the reason for my machine lockups.




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