From owner-freebsd-questions Wed Feb 7 8:24: 9 2001 Delivered-To: freebsd-questions@freebsd.org Received: from dsl-64-193-218-89.telocity.com (dsl-64-193-218-89.telocity.com [64.193.218.89]) by hub.freebsd.org (Postfix) with SMTP id BAC4E37B401 for ; Wed, 7 Feb 2001 08:23:51 -0800 (PST) Received: (qmail 10254 invoked by uid 1000); 7 Feb 2001 16:21:10 -0000 Date: Wed, 7 Feb 2001 10:21:10 -0600 From: Lucas Bergman To: Will Mitayai Keeso Rowe Cc: freebsd-questions@freebsd.org Subject: Re: Limiting offline processes Message-ID: <20010207102109.B29737@billygoat.slb.to> Reply-To: lucas@slb.to References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from mit@mitayai.net on Wed, Feb 07, 2001 at 08:11:43AM -0500 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > On one of my clients' shell boxes, some users run eggdrop bots in > background processes while offline... [I]'m concerned about CPU > time, mem usage, etc, and want to impose some sort of limitations. > Is there a way to limit the resources their processes use, or how > many processes they can have running in the bagground when not > logged in? > > I'm running FreeBSD 4.2-STABLE... > > I *have* read the login.conf man page, and i admit that it really > confuses me, so if the answer is in there, a little help > interpreting it would be appreciated. You're in the right starting place. :) Everything a user does is governed by so-called ``resource limits.'' The default login.conf in FreeBSD 4 (this didn't used to be the case) effectively disables limits, setting most to infinity. However, at the bottom are some examples with resource limits enabled. This should allow you to limit CPU time per process, number of processes, number of file descriptors open per process, memory per process, etc. Each limit is described verbosely in getrlimit(2). Be careful to assign limited users to a different login class than users under which daemons run, though. It would be bad news if, for example, your qmail logging daemon crapped out because it bumped up against its CPU time limit. Good luck, Lucas To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message