From owner-freebsd-questions@FreeBSD.ORG Sat Feb 14 12:54:28 2004 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 A5D9216A4CE for ; Sat, 14 Feb 2004 12:54:28 -0800 (PST) Received: from smtp.infracaninophile.co.uk (ns0.infracaninophile.co.uk [81.2.69.218]) by mx1.FreeBSD.org (Postfix) with ESMTP id EA99A43D2D for ; Sat, 14 Feb 2004 12:54:27 -0800 (PST) (envelope-from m.seaman@infracaninophile.co.uk) Received: from happy-idiot-talk.infracaninophile.co.uk (localhost [IPv6:::1]) i1EKsGKw004250 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 14 Feb 2004 20:54:17 GMT (envelope-from matthew@happy-idiot-talk.infracaninophile.co.uk) Received: (from matthew@localhost)id i1EKsG1M004249; Sat, 14 Feb 2004 20:54:16 GMT (envelope-from matthew) Date: Sat, 14 Feb 2004 20:54:16 +0000 From: Matthew Seaman To: "Hugo (6s-gaming.com)" Message-ID: <20040214205416.GB3904@happy-idiot-talk.infracaninophile.co.uk> Mail-Followup-To: Matthew Seaman , "Hugo (6s-gaming.com)" , freebsd-questions@freebsd.org References: <45289.212.113.164.100.1076785919.squirrel@mail.6s-gaming.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="XF85m9dhOBO43t/C" Content-Disposition: inline In-Reply-To: <45289.212.113.164.100.1076785919.squirrel@mail.6s-gaming.com> User-Agent: Mutt/1.5.6i X-Spam-Status: No, hits=-4.9 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=2.63 X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on happy-idiot-talk.infracaninophile.co.uk cc: freebsd-questions@freebsd.org Subject: Re: background process limit? 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: Sat, 14 Feb 2004 20:54:28 -0000 --XF85m9dhOBO43t/C Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Feb 14, 2004 at 08:11:59PM +0100, Hugo (6s-gaming.com) wrote: > Is there a way to limit background processes ? I need to separate these > from foreground processes, but can't find a way to. Any ideas? There isn't really any way of distinguishing foreground and background processes apart from typing 'jobs' at the shell prompt. 'Foreground' and 'background' processes are concepts specific to your shell -- as far as the system is concerned, a process is a process, and it doesn't care if that's the process currently accepting interactive input from the tty or not. =20 You can use the limits(1) command or the settings in /etc/login.conf to limit the total number of processes are user can run, which effectively prevents them from spawning too many background processes. You can set the 'maxfiles' limit quite high if the intent is to prevent your users from forkbombing your machine -- that will avoid interfereing with normal usage. If the problem is that your system is running out of resources to cope with the number of users and processes on it, then you're probably better off looking at each users' datasize, filesize, cputime, memoryuse and/or virtualmem limits as well. However, don't be too draconian or your users will become quite irate as their legitimate processes start to get killed off. Cheers, Matthew --=20 Dr Matthew J Seaman MA, D.Phil. 26 The Paddocks Savill Way PGP: http://www.infracaninophile.co.uk/pgpkey Marlow Tel: +44 1628 476614 Bucks., SL7 1TH UK --XF85m9dhOBO43t/C Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFALor4dtESqEQa7a0RAskxAJ9Vo5NjMZSSR+cCBzx43Rj2b9NP5ACfX9pU XTI1lmeu2Up4vqZN4h0hV+k= =YVeM -----END PGP SIGNATURE----- --XF85m9dhOBO43t/C--