From owner-freebsd-hackers@FreeBSD.ORG Sun Apr 20 16:20:32 2003 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3F4CC37B401 for ; Sun, 20 Apr 2003 16:20:32 -0700 (PDT) Received: from stork.mail.pas.earthlink.net (stork.mail.pas.earthlink.net [207.217.120.188]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9EB8543F75 for ; Sun, 20 Apr 2003 16:20:31 -0700 (PDT) (envelope-from tlambert2@mindspring.com) Received: from pool0075.cvx21-bradley.dialup.earthlink.net ([209.179.192.75] helo=mindspring.com) by stork.mail.pas.earthlink.net with asmtp (SSLv3:RC4-MD5:128) (Exim 3.33 #1) id 197O6W-0000Ow-00; Sun, 20 Apr 2003 16:20:13 -0700 Message-ID: <3EA32ADA.CC05B003@mindspring.com> Date: Sun, 20 Apr 2003 16:18:50 -0700 From: Terry Lambert X-Mailer: Mozilla 4.79 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: "Kevin A. Pieckiel" References: <20030420210118.GA21255@pacer.dmz.smartrafficenter.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-ELNK-Trace: b1a02af9316fbb217a47c185c03b154d40683398e744b8a42265d4e63792ddd1b6174dbe625b5f1a350badd9bab72f9c350badd9bab72f9c350badd9bab72f9c cc: freebsd-hackers@freebsd.org Subject: Re: maxfiles, file table, descriptors, etc... X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Apr 2003 23:20:32 -0000 "Kevin A. Pieckiel" wrote: > First, do open sockets (inet or unix) or pipes (via pipe(2)) count > against kern.maxfiles, kern.maxfilesperproc, and other related limits? Yes. And the limits are not runtime settable. > Second, are there sysctl variables that indicate the size or usage > of the file table? Or is this simply indicated by maxfiles (and > perhaps others)? Or is there a program that will report this info? The "lsof" program will report open files. The "maxfiles" variable is a limit. The limit is runtime for files, boot time for sockets. The value of "kern.openfiles" is valid, but not very useful. > Third, where is the limit for the number of file descriptors that > can be open set? Or is this the same limit as maxfiles, etc? It's "maxfiles". > Fourth, is there a difference between an open file and an open > descriptor? Not specifically. Practically, no. > These questions were spawned from the errors possibly returned by > pipe(2). I'm not clear on what the entities and limits are as > they involve such things as the file table, open files, open > descriptors, etc. > > Finally, are answers to these questions OS specific, or are they > part of a standard indicating how such things behave? They are pretty much OS specific, for the answers. The questions aren't. -- Terry