From owner-freebsd-questions Sat Jun 9 10:12:36 2001 Delivered-To: freebsd-questions@freebsd.org Received: from smtpg.casema.net (smtpg.casema.net [195.96.96.160]) by hub.freebsd.org (Postfix) with SMTP id 172FA37B405 for ; Sat, 9 Jun 2001 10:12:30 -0700 (PDT) (envelope-from walter@binity.com) Received: (qmail 870 invoked by uid 0); 9 Jun 2001 17:12:27 -0000 Received: from unknown (HELO slash.b118.binity.net) (212.64.76.130) by smtpg.casema.net with SMTP; 9 Jun 2001 17:12:27 -0000 Received: from 172.18.3.10 (silver.b118.binity.net [172.18.3.10]) by slash.b118.binity.net (Postfix) with ESMTP id D5A52142; Sat, 9 Jun 2001 19:12:17 +0200 (CEST) Date: Sat, 9 Jun 2001 19:12:34 +0200 From: Walter Hop X-Mailer: The Bat! (v1.52f) Educational Organization: Binity X-Priority: 3 (Normal) Message-ID: <14122019722.20010609191234@binity.com> To: "Jonathan Slivko" Cc: FreeBSD Questions , teo@gecadsoftware.com Subject: Re[2]: How to keep a process from eating >n percent CPU? In-Reply-To: <200106091245.AA1833238794@stmail.pace.edu> References: <200106091245.AA1833238794@stmail.pace.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hi Teo and Jonathan, >> lauch it using bash, after you previously imposed a limit on >> resurses with ulimit (in your case, with -t) Unfortunately the limit controls of `ulimit' and in login.conf can only impose a limit on CPU seconds, not percentage. This is good for batch jobs, but not for a daemon, to which I would typically allocate an unlimited amount of CPU time (they could be running for months on end). > Or run it with "nice" =) As a matter of fact I am now using nice(1), I only wished there would be a means of controlling this in a more "fine-grained" method. For one, I would love it if I could impose a limit of 90% CPU on Apache, so that if for example a runaway CGI script started doing weird things, admins would still have a (greater) possibility to be able to log on the shell and fix stuff in a proper fashion (i.e. not waiting 30 seconds for the output of `ps' to appear). Thanks for your replies anyway; any further comments would be appreciated :) walter. -- Walter Hop | +31 6 24290808 | Finger for public key To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message