*BSD News Article 81564


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!news.cs.su.oz.au!metro!metro!munnari.OZ.AU!spool.mu.edu!howland.erols.net!EU.net!news.mathworks.com!fu-berlin.de!pruess.dialup.fu-berlin.DE!not-for-mail
From: Gunnar Pruessner <pruess@fub46.zedat.fu-berlin.de>
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: maxfiles/fstat
Date: Fri, 25 Oct 1996 03:17:54 +0000
Organization: Home sweet home
Lines: 25
Message-ID: <32703162.41C67EA6@fub46.zedat.fu-berlin.de>
NNTP-Posting-Host: pruess.dialup.fu-berlin.de (160.45.217.125)
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Access: 16 17 19
X-Mailer: Mozilla 3.0 (X11; I; FreeBSD 2.1.0-RELEASE i386)
CC: pruess

Hi!
Looking in /usr/src/sys/conf/param.c I found 

#define NPROC (20 + 16 * MAXUSERS)
maxfiles=NPROC*2;

Since I compiled the kernel with MAXUSERS=10, maxfiles must be 360 -
but using fstat I found more than 360 open files.

Looking in /usr/src/sys/kern/kern_descrip.c I found
[...]
        if (nfiles >= maxfiles) {
                tablefull("file");
                return (ENFILE);
        }
[...]

But I never found such a message (something like "table full" or "too
many open files in system") in /var/log/messages. So I tried to open as
much files as possible and found a number of about 600 - WHY?!?!

Thank you for your help!
Gunnar

PS: Please send me your answer as an email.