Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 7 Feb 2001 10:21:10 -0600
From:      Lucas Bergman <lucas@slb.to>
To:        Will Mitayai Keeso Rowe <mit@mitayai.net>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Limiting offline processes
Message-ID:  <20010207102109.B29737@billygoat.slb.to>
In-Reply-To: <NEBBIEGPMLMKDBMMICFNKECPEDAA.mit@mitayai.net>; from mit@mitayai.net on Wed, Feb 07, 2001 at 08:11:43AM -0500
References:  <NEBBIEGPMLMKDBMMICFNKECPEDAA.mit@mitayai.net>

next in thread | previous in thread | raw e-mail | index | archive | help
> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010207102109.B29737>