From owner-freebsd-questions Thu Nov 23 11:43:28 2000 Delivered-To: freebsd-questions@freebsd.org Received: from satan.freebsdsystems.com (satan.freebsdsystems.com [24.69.168.5]) by hub.freebsd.org (Postfix) with ESMTP id 4631037B479 for ; Thu, 23 Nov 2000 11:43:25 -0800 (PST) Received: from satan.freebsdsystems.com (satan.freebsdsystems.com [24.69.168.5]) by satan.freebsdsystems.com (8.11.1/8.11.0) with ESMTP id eANJhCp24968; Thu, 23 Nov 2000 14:43:13 -0500 (EST) Date: Thu, 23 Nov 2000 14:43:12 -0500 (EST) From: Lanny Baron To: Alfred Perlstein Cc: Richard B Mahoney , freebsd-questions@FreeBSD.ORG Subject: Re: Restricting a users CPU usage -- Possible? In-Reply-To: <20001122180523.U18037@fw.wintelcom.net> 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 Hi, Here is how I manage cpu usage for shell users on one of my FreeBSD Freedom servers: shell:\ :cputime=30M:\ :datasize-cur=22M:\ :stacksize-cur=8M:\ :memorylocked-cur=10M:\ :memoryuse-cur=30M:\ :filesize=infinity:\ :coredumpsize=infinity:\ :maxproc-cur=6:\ :openfiles-cur=64:\ :priority=10:\ :requirehome@:\ :umask=022:\ :tc=default: Which is in /etc/login.conf What you need to do, is make a class inside login.conf and put in there, the values you want. Remember to do the following if you change your /etc/login.conf file: cap_mkdb /etc/login.conf --Lanny On Wed, 22 Nov 2000, Alfred Perlstein in the last wild and more than...: >* Richard B. Mahoney [001122 17:48] wrote: >> Dear Readers, >> >> I know its possible to restrict user disk storage quotas under FreeBSD >> but what about a user's CPU usage? I've searched for info on this and >> have come up empty handed. The reason I ask is as follows. >[snip] > >Well you can limit RAM usage via the login.conf(5) limiting facility. > >That ought to keep the programs from getting out of control and >swamping the box. > >> The other day Emacs kept climbing in this way and exceeded the >> available swap space. The system promptly stepped in and killed it by >> itself! I was in many ways delighted. Under any other system and a >> reboot would have been needed. > >Maybe we ought to switch the policy of out of memory so that the >kernel will seek and destroy all emacs processes... :) > >-- >-Alfred Perlstein - [bright@wintelcom.net|alfred@freebsd.org] >"I have the heart of a child; I keep it in a jar on my desk." > > >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