Date: Sat, 14 Feb 2004 20:54:16 +0000 From: Matthew Seaman <m.seaman@infracaninophile.co.uk> To: "Hugo (6s-gaming.com)" <admin@6s-gaming.com> Cc: freebsd-questions@freebsd.org Subject: Re: background process limit? Message-ID: <20040214205416.GB3904@happy-idiot-talk.infracaninophile.co.uk> In-Reply-To: <45289.212.113.164.100.1076785919.squirrel@mail.6s-gaming.com> References: <45289.212.113.164.100.1076785919.squirrel@mail.6s-gaming.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040214205416.GB3904>