From owner-freebsd-questions@FreeBSD.ORG Mon Oct 27 06:02:11 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AB2FE16A4B3 for ; Mon, 27 Oct 2003 06:02:11 -0800 (PST) Received: from gwdu60.gwdg.de (gwdu60.gwdg.de [134.76.8.60]) by mx1.FreeBSD.org (Postfix) with ESMTP id 17FBF43F75 for ; Mon, 27 Oct 2003 06:02:10 -0800 (PST) (envelope-from kheuer2@gwdg.de) Received: from gwdu60.gwdg.de (localhost [127.0.0.1]) by gwdu60.gwdg.de (8.12.8p1/8.12.8) with ESMTP id h9RE26cq092870; Mon, 27 Oct 2003 15:02:06 +0100 (CET) (envelope-from kheuer2@gwdg.de) Received: from localhost (kheuer2@localhost)h9RE255g092866; Mon, 27 Oct 2003 15:02:05 +0100 (CET) X-Authentication-Warning: gwdu60.gwdg.de: kheuer2 owned process doing -bs Date: Mon, 27 Oct 2003 15:02:05 +0100 (CET) From: Konrad Heuer To: "Woolworth,Derrick" In-Reply-To: Message-ID: <20031027150027.O91426@gwdu60.gwdg.de> References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: "'freebsd-questions@freebsd.org'" Subject: Re: Open Files X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Oct 2003 14:02:11 -0000 On Mon, 27 Oct 2003, Woolworth,Derrick wrote: > I am having difficulty with one system - FreeBSD 4.8 > > After a couple of days, the system continually reports that there are too > many files open. At that time I cannot ssh into the system or ftp, etc. > obviously, the kern.maxfiles is too low. > > However, I have continually increased the number of max files - actually > both: > > kern.maxfiles = 65535 > kern.maxfilesperproc = 65535 > > The system is running 141 processes on average, which isn't terrible in my > opinion. Most of these are Apache 1.3.27, MySQL 4.1.0-alpha, Courier mail > system, and a couple of applications my firm has written ourselves. > > The question is really, is there a way to examine how many files are open on > a per process basis? I know we can monitor the number of open files with > pstat -T, but this doesn't help us troubleshoot which application is > responsible for this large number of open files. > > The processes that we are building are daemons that are pre-forked - none > seem to be crashing, and we've checked the open/close calls as closely as > possible. > > Also, does anyone know of a bug in MySQL or mod_php4 (4.3.4.r1) or Courier > 0.43.0 that would cause files to be opened and not closed? I'd suggest lsof from /usr/ports/sysutils/lsof which listens all open files in the system. Regards Konrad Konrad Heuer (kheuer2@gwdg.de) ____ ___ _______ GWDG / __/______ ___ / _ )/ __/ _ \ Am Fassberg / _// __/ -_) -_) _ |\ \/ // / 37077 Goettingen /_/ /_/ \__/\__/____/___/____/ Germany