From owner-freebsd-questions Wed Nov 22 17:48:44 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 8B99F37B4D7 for ; Wed, 22 Nov 2000 17:48:41 -0800 (PST) Received: from CONVERSION-DAEMON.it.canterbury.ac.nz by it.canterbury.ac.nz (PMDF V6.0-24 #45723) id <01JWVT7NO3KG8ZJKFC@it.canterbury.ac.nz> for freebsd-questions@FreeBSD.org; Thu, 23 Nov 2000 14:48:34 +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 <01JWVT7LWQ8M8X23GQ@it.canterbury.ac.nz> for freebsd-questions@FreeBSD.org; Thu, 23 Nov 2000 14:48:33 +1300 (NEW ZEALAND DAYLIGHT TIME) Received: (from rbm49@localhost) by student.canterbury.ac.nz (8.9.3/8.9.3) id OAA43822 for freebsd-questions@FreeBSD.org; Thu, 23 Nov 2000 14:47:14 +1300 (NZDT envelope-from rbm49) Date: Thu, 23 Nov 2000 14:46:45 +1300 From: "Richard B. Mahoney" Subject: Restricting a users CPU usage -- Possible? To: freebsd-questions@FreeBSD.org Reply-To: Richard B Mahoney Mail-followup-to: freebsd-questions@FreeBSD.org Message-id: <20001123144644.B42752@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 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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. This is the system: FreeBSD student.canterbury.ac.nz 4.0-RELEASE FreeBSD 4.0-RELEASE #0: Thu Jul 20 13:20:28 NZST 2000 root@172.31.45.238:/usr/src/sys/compile/MUGGINS i386 It's an elderly Digital Venturis 5133 with 40Meg RAM. This is the problem: I spend most of my time in Emacs writing papers with AucTeX and teTeX. They have lots of footnotes & I am always reformating paragraphs and so on. On occaision, if the formating is particularly tricky, Emacs starts chewing up memory. It can blow out from its usual 8Meg or so to over 30Meg. The trouble is that once it reaches these levels it just stays there and never returns to its original level. The only way to peg it back is to kill it and startup all over again. The other problem is that when its formating it almost completely takes over the processor and other programmes become unresponsive. 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. Nonetheless, what I would like to do is to restrict the amount of CPU that emacs has access to. In this way, if it decides to become a rogue programme I can simply Ctl-Alt-F2 out of Blackbox, then log in as root, and have sufficient CPU available to quickly put a stop to it. Any assistance would be appreciated. Regards, Richard Mahoney -- ====================================================================== 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