*BSD News Article 82025


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!news.mel.connect.com.au!news.mel.aone.net.au!news-out.internetmci.com!pull-feed.internetmci.com!www.facs.federated-fds.com!news.ececs.uc.edu!newsrelay.netins.net!newsfeed.dacom.co.kr!usenet.kornet.nm.kr!agate!howland.erols.net!news.mathworks.com!fu-berlin.de!irz401!orion.sax.de!uriah.heep!news
From: j@uriah.heep.sax.de (J Wunsch)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: maxfiles/fstat
Date: 29 Oct 1996 21:18:35 GMT
Organization: Private BSD site, Dresden
Lines: 45
Message-ID: <555sbb$621@uriah.heep.sax.de>
References: <32703162.41C67EA6@fub46.zedat.fu-berlin.de>
Reply-To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch)
NNTP-Posting-Host: localhost.heep.sax.de
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Newsreader: knews 0.9.6
X-Phone: +49-351-2012 669
X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F  93 21 E0 7D F9 12 D6 4E
Cc: Gunnar Pruessner <pruess@fub46.zedat.fu-berlin.de>

Gunnar Pruessner <pruess@fub46.zedat.fu-berlin.de> wrote:

> 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?!?!

Have you tried to open _different_ files?

j@uriah 226% limit desc unlim
j@uriah 227% limit desc
descriptors     680 
j@uriah 228% perl -e '\
	sub xopen {\
	local($i)=@_;\
	local(*F);\
	$i++;\
	if(open(F,">foo$i")) { &xopen($i) }\
	else { print "Got $i files.\n"; }\
	unlink("foo$i");\
}\
&xopen(1);'
Got 487 files.
Oct 29 22:13:03 uriah /kernel: file: table is full
Oct 29 22:13:03 uriah /kernel: file: table is full

My maxusers is 20, this makes 680 descriptors -- the value you can see
after ``limit unlimited'' above.

> PS: Please send me your answer as an email.

(Cc sent.  Please _don't_ send me a private Cc.)
-- 
cheers, J"org

joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)