From owner-freebsd-hackers@FreeBSD.ORG Wed Dec 8 22:45:31 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 132CD1065670 for ; Wed, 8 Dec 2010 22:45:31 +0000 (UTC) (envelope-from chuckr@telenix.org) Received: from mail4.sea5.speakeasy.net (mail4.sea5.speakeasy.net [69.17.117.48]) by mx1.freebsd.org (Postfix) with ESMTP id E67528FC0C for ; Wed, 8 Dec 2010 22:45:30 +0000 (UTC) Received: (qmail 20398 invoked from network); 8 Dec 2010 22:18:49 -0000 Received: from april.chuckr.org (HELO april.telenix.org) (chuckr@[66.92.151.30]) (envelope-sender ) by mail4.sea5.speakeasy.net (qmail-ldap-1.03) with AES256-SHA encrypted SMTP for ; 8 Dec 2010 22:18:49 -0000 Message-ID: <4D000448.1050606@telenix.org> Date: Wed, 08 Dec 2010 17:18:48 -0500 From: Chuck Robey User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.9.2.8) Gecko/20100907 Thunderbird/3.1.2 MIME-Version: 1.0 To: FreeBSD-Hackers Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: getting a list of open files versus PID nos.? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Dec 2010 22:45:31 -0000 I think, *maybe* that I have located what's been giving me all of those machine lockups. I was all ready to replace the mobo & cpu when I noticed a panic error of being out of open files. The message suggested just adding the ability for more open files, but if it's what I think it is, that would 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 are associated with each Pid? And maybe a "ps ax" list, so I can associate an application with a pid. I would set things up so it would do this every 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? I 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.