Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 8 Dec 2010 14:54:57 -0800
From:      Matthew Fleming <mdf356@gmail.com>
To:        Chuck Robey <chuckr@telenix.org>
Cc:        FreeBSD-Hackers <freebsd-hackers@freebsd.org>
Subject:   Re: getting a list of open files versus PID nos.?
Message-ID:  <AANLkTinssm_1rPZ-pPbpGKghDbQfDx29y-y8e-NRSJHo@mail.gmail.com>
In-Reply-To: <4D000448.1050606@telenix.org>
References:  <4D000448.1050606@telenix.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Dec 8, 2010 at 2:18 PM, Chuck Robey <chuckr@telenix.org> wrote:
> I think, *maybe* that I have located what's been giving me all of those
> machine lockups. =A0I was all ready to replace the mobo & cpu when I noti=
ced a
> panic error of being out of open files. =A0The message suggested just add=
ing
> the ability for more open files, but if it's what I think it is, that wou=
ld
> only mean it would take longer to panic, but it would still be tossing
> panics at me.
>
> What I want to see is a list of all Pids and how many open files there ar=
e
> associated with each Pid? =A0And maybe a "ps ax" list, so I can associate=
 an
> application with a pid. =A0I would set things up so it would do this ever=
y 15
> minutes, and it might just point me at my real problem here.
>
> Any idea what would be the best way to get a list of all openfiles versus
> each open pid? =A0I would be happy to write up a python script to give me
> application versus count of open files list, if I could start with that
> files versus pids thing.

This is what lsof is for.  I believe there's one in ports, but I have
never tried it.

Cheers,
matthew



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