From owner-freebsd-questions Sun Oct 22 16:40:59 2000 Delivered-To: freebsd-questions@freebsd.org Received: from guru.mired.org (okc-27-149-77.mmcable.com [24.27.149.77]) by hub.freebsd.org (Postfix) with SMTP id 118C437B479 for ; Sun, 22 Oct 2000 16:40:56 -0700 (PDT) Received: (qmail 43879 invoked by uid 100); 22 Oct 2000 23:40:55 -0000 From: Mike Meyer MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <14835.31495.41764.305120@guru.mired.org> Date: Sun, 22 Oct 2000 18:40:55 -0500 (CDT) To: John Cc: Arcady Genkin , questions@FreeBSD.ORG Subject: Re: Too many open files in system In-Reply-To: <4.3.2.7.2.20001022192850.00adb470@mail.udel.edu> References: <110118888@toto.iv> <4.3.2.7.2.20001022192850.00adb470@mail.udel.edu> X-Mailer: VM 6.75 under 21.1 (patch 10) "Capitol Reef" XEmacs Lucid X-face: "5Mnwy%?j>IIV\)A=):rjWL~NB2aH[}Yq8Z=u~vJ`"(,&SiLvbbz2W`;h9L,Yg`+vb1>RG% *h+%X^n0EZd>TM8_IB;a8F?(Fb"lw'IgCoyM.[Lg#r\ Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG John writes: > > > > > Looking at the sysctl man page, you'll find plenty of options to > > > > tweak. I see a kern.maxfiles option, though I'm not exactly sure what > > > > it does. Sounds like it may be worth looking into. > > > This option is not explained in the manpage, so I looked at > > > sys/sysctl.h file and it seems that this might be the max number of > > > open files on the system. However, this number is set to 552 right > > > now, whereas `lsof' reports 809 open files. > > > ,---- > > > | soup:/usr/include/sys# sysctl kern.maxfiles > > > | kern.maxfiles: 552 > > > | soup:/usr/include/sys# lsof | wc -l > > > | 809 > > > `---- > > > Am I misunderstanding something? Any further ideas? > >I don't have the lsof man page installed, but it may be counting every > >occurence of a shared file descriptor, whereas kern.maxfiles counts > >the actual open file descriptors. Try checking kern.openfiles. > I may be *really* far off on this, but within the man page for sysctl, > within `sysctl -a` and also in the source code of sysctl.h there appears to > be no reference to kern.openfiles? Even more so interesting is that > `sysctl -a | grep file | less` yields about 60+ lines of "<3>file: table is > full". I'm not sure when openfiles went in (I'm not positive it's in -stable yet), but the idea that lsof and maxfiles are counting different things is the critical one.