From owner-freebsd-questions@FreeBSD.ORG Mon Apr 28 14:11:27 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BD57637B401 for ; Mon, 28 Apr 2003 14:11:27 -0700 (PDT) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id 232FD43FBD for ; Mon, 28 Apr 2003 14:11:27 -0700 (PDT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.12.9/8.12.9) id h3SLBFlY093072; Mon, 28 Apr 2003 16:11:15 -0500 (CDT) (envelope-from dan) Date: Mon, 28 Apr 2003 16:11:15 -0500 From: Dan Nelson To: Shane Hale Message-ID: <20030428211115.GU22259@dan.emsphone.com> References: <02b501c30dc9$60a305b0$0400a8c0@251AGerrardStE.dreamlabs.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <02b501c30dc9$60a305b0$0400a8c0@251AGerrardStE.dreamlabs.com> X-OS: FreeBSD 5.0-CURRENT X-message-flag: Outlook Error User-Agent: Mutt/1.5.4i cc: freebsd-questions@freebsd.org Subject: Re: Limiting Processes X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Apr 2003 21:11:28 -0000 In the last episode (Apr 28), Shane Hale said: > I'm trying to limit the amount of time a process will run in > userland. Some of the users on my the network decide to keep BitchX > and IRC processes running for eons and I'm wondering if there is a > way to stop this. You can set per-process cpu limits in /etc/login.conf (the cputime capability). Although you may be misreading the CPU column. It's in minutes:seconds.fractions, so for example > beastah 29501 0.0 1.2 3324 1460 p3 Ss+ 11Apr03 2:37.11 BitchX -n BeAsTaH irc.gamesnet.net (BitchX-1.0c19) This user started a session on the 11th, and it has consumed 2 minutes of CPU time. Not all that much for 17 days of real time. If you have a CPU load issue it's probably someplace else. If you just want to kill long-running processes on principle, the idled utility in ports/sysutils/idled might have a way to do that. -- Dan Nelson dnelson@allantgroup.com