From owner-freebsd-questions Sat Nov 25 1:57:41 2000 Delivered-To: freebsd-questions@freebsd.org Received: from cantvc.canterbury.ac.nz (cantvc.canterbury.ac.nz [132.181.30.1]) by hub.freebsd.org (Postfix) with ESMTP id 6B27B37B4C5 for ; Sat, 25 Nov 2000 01:57:38 -0800 (PST) Received: from CONVERSION-DAEMON.it.canterbury.ac.nz by it.canterbury.ac.nz (PMDF V6.0-24 #45723) id <01JWZ2VG5EB48ZJGRS@it.canterbury.ac.nz> for freebsd-questions@FreeBSD.ORG; Sat, 25 Nov 2000 22:57:25 +1300 (NEW ZEALAND DAYLIGHT TIME) Received: from student.canterbury.ac.nz (rbm49.tacacs.canterbury.ac.nz [172.31.164.87]) by it.canterbury.ac.nz (PMDF V6.0-24 #45723) with ESMTP id <01JWZ2V4J0P88X2TZ9@it.canterbury.ac.nz> for freebsd-questions@FreeBSD.ORG; Sat, 25 Nov 2000 22:57:25 +1300 (NEW ZEALAND DAYLIGHT TIME) Received: (from rbm49@localhost) by student.canterbury.ac.nz (8.9.3/8.9.3) id WAA08345 for freebsd-questions@FreeBSD.ORG; Sat, 25 Nov 2000 22:55:37 +1300 (NZDT envelope-from rbm49) Date: Sat, 25 Nov 2000 22:55:34 +1300 From: "Richard B. Mahoney" Subject: Re: Restricting a users CPU usage -- Possible? In-reply-to: <"from lnb"@FreeBSDsystems.COM> To: freebsd-questions@FreeBSD.ORG Mail-followup-to: freebsd-questions@FreeBSD.ORG Message-id: <20001125225534.A8248@student.canterbury.ac.nz> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-disposition: inline User-Agent: Mutt/1.2.5i X-Operating-System: FreeBSD 4.0 Release References: <20001122180523.U18037@fw.wintelcom.net> Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Dear Readers, To those of you who responded to my request for help I'd like to give my thanks. Within half an hour I'd received at least four replies. I'm sure this is better than one could expect from a commercial helpdesk. I've implemented roughly what is given below. This has succeeded in keeping a tight rein on emacs. Even at its worst, it now doesn't seem to be able to climb much past 30Meg. And, once its been at this level for a while, it isn't able to absorb much more than about 65% CPU. The upshot is that I'm left plenty of room to move, other programmes still respond, and I can easily kill emacs without having to switch over to root. Many regards, Richard Mahoney On Thu, Nov 23, 2000 at 02:43:12PM -0500, Lanny Baron wrote: > 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 > -- ====================================================================== Richard Mahoney /^^^\ Telephone: +64-3-351-5831 78 Jeffreys Rd (| , , |) Christchurch | * | NEW ZEALAND \_-_/ mailto:rbm49@csc.canterbury.ac.nz ---------------------------------------------------------------------- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message