From owner-freebsd-questions Mon Oct 9 4:19:57 2000 Delivered-To: freebsd-questions@freebsd.org Received: from ns1.tetronsoftware.com (ns1.tetronsoftware.com [64.217.1.41]) by hub.freebsd.org (Postfix) with ESMTP id 95C8937B502 for ; Mon, 9 Oct 2000 04:19:50 -0700 (PDT) Received: from ns1.tetronsoftware.com (ns1.tetronsoftware.com [64.217.1.41]) by ns1.tetronsoftware.com (8.11.0/8.9.3) with ESMTP id e99BJZw96691; Mon, 9 Oct 2000 06:19:35 -0500 (CDT) (envelope-from zeus@tetronsoftware.com) Date: Mon, 9 Oct 2000 06:19:35 -0500 (CDT) From: Gene Harris To: Odhiambo Washington Cc: FreeBSD-Questions Subject: Re: sysctl -w In-Reply-To: <20001009084836.A8271@siafu.iconnect.co.ke> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG See responses below. I hope they help. Gene On Mon, 9 Oct 2000, Odhiambo Washington wrote: > Hello, > May I ask one question about sysctl. > I get the following msg from the kernel: > > Oct 9 02:57:06 alouette syslogd: /dev/console: Too many open files in > system: Too many open files in system > Oct 9 02:57:06 alouette /kernel: file: table is full > Oct 9 02:57:14 alouette last message repeated 8 times > Oct 9 02:57:16 alouette /kernel: pid 5236 (cron), uid 0: exited on signal > 11 (core dumped) > > So I asked myself, what is the current set value? > admin:~$ sysctl kern.maxproc > kern.maxproc: 532 > > ..And decided (maybe against bad judgement??) that I could double the > value to be on the safe side... > > alouette# sysctl -w kern.maxproc=1064 > sysctl: oid 'kern.maxproc' is read only > alouette# > > So it is ro! Now what must I do? > You need to recompile your kernel, I believe. It looks like you need to increase the size of maxusers. This will increase the maximum number of open files and maximum number of processes. > I attach output of ps -ax (the processes always running in my box) > > PID TT STAT TIME COMMAND > 0 ?? DLs 0:00.00 (swapper) > 1 ?? ILs 0:00.01 /sbin/init -- > 2 ?? DL 0:00.00 (pagedaemon) > 3 ?? DL 0:00.00 (vmdaemon) > 4 ?? DL 0:00.00 (bufdaemon) > 5 ?? DL 0:00.06 (syncer) > 29 ?? Is 0:00.00 adjkerntz -i > 90 ?? Ss 0:00.04 syslogd -s > 93 ?? Is 0:00.01 named -u bind -g bind > 95 ?? Is 0:00.00 /usr/sbin/portmap > 115 ?? Is 0:00.05 inetd -w -W > 117 ?? Ss 0:00.01 cron > 120 ?? Is 0:00.01 /usr/sbin/lpd > 123 ?? Is 0:00.56 /usr/sbin/sshd > 168 ?? Is 0:00.24 moused -p /dev/psm0 -t auto > 196 ?? Is 0:00.00 /usr/local/sbin/dhcpd -q > 212 ?? Ss 0:00.06 /usr/local/sbin/httpd > 218 ?? Is 0:00.00 /usr/local/sbin/exim -bd -q30m > 226 ?? Is 0:00.01 /usr/local/sbin/faxq > 242 ?? I 0:00.00 /usr/local/sbin/httpd > 243 ?? I 0:00.00 /usr/local/sbin/httpd > 244 ?? I 0:00.00 /usr/local/sbin/httpd > 245 ?? I 0:00.00 /usr/local/sbin/httpd > 246 ?? I 0:00.00 /usr/local/sbin/httpd > 254 ?? S 0:00.03 /usr/local/libexec/atalkd > 258 ?? I 0:00.00 /usr/local/libexec/papd > 260 ?? S 0:00.00 /usr/local/libexec/afpd -s /usr/local/etc/AppleVolume > 266 ?? Is 0:00.01 /usr/local/sbin/pptpd > 274 ?? I 0:00.00 /usr/local/bin/qpage -q10 > 278 ?? I 0:00.00 /usr/local/bin/qpage -q10 > 285 ?? Is 0:00.00 /usr/local/sbin/smbd -D > 287 ?? Ss 0:00.10 /usr/local/sbin/nmbd -D > 321 ?? I 0:00.03 /usr/local/sbin/faxgetty cuaa0 > 323 ?? S 0:01.25 squid -NsY > 324 ?? Is 0:00.00 (unlinkd) (unlinkd) > 310 v0 Is+ 0:00.01 /usr/libexec/getty Pc ttyv0 > 311 v1 Is 0:00.15 -tcsh (tcsh) > 331 v1 S+ 0:00.10 telnet siafu > 312 v2 Ss 0:00.07 -bash (bash) > 390 v2 R+ 0:00.00 ps -ax > 313 v3 Is+ 0:00.01 /usr/libexec/getty Pc ttyv3 > 314 v4 Is+ 0:00.01 /usr/libexec/getty Pc ttyv4 > 315 v5 Is+ 0:00.01 /usr/libexec/getty Pc ttyv5 > 316 v6 Is+ 0:00.01 /usr/libexec/getty Pc ttyv6 > 317 v7 Is+ 0:00.01 /usr/libexec/getty Pc ttyv7 > 318 v9 Is+ 0:00.01 /usr/libexec/getty Pc ttyv9 > 319 va Is+ 0:00.01 /usr/libexec/getty Pc ttyva > 320 vb Is+ 0:00.01 /usr/libexec/getty Pc ttyvb > 295 con- I+ 0:00.09 /usr/local/sbin/snmpd > 303 con- I+ 0:00.00 /bin/sh /usr/local/sbin/RunCache > > How do I get the culprit who opens so many files? > I have copied some information from the archives for you: Archive Response =========================================== download and compile this: http://people.freebsd.org/~alfred/nfiles.tgz kldload it and do a 'sysctl -a | grep files' enjoy, -- -Alfred Perlstein - [bright@wintelcom.net|alfred@freebsd.org] Archive Response End ======================================= > Thank you gentlemen. > > -Wash > -- > Odhiambo Washington Inter-Connect Ltd., > wash@iconnect.co.ke 5th Flr Furaha Plaza > Tel: 254 11 222604 Nkrumah Rd., > Fax: 254 11 222636 PO Box 83613 MOMBASA, KENYA. > > It is illegal to drive more than two thousand sheep down Hollywood Boulevard at > one time. > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message