Date: Thu, 23 Nov 2000 14:43:12 -0500 (EST) From: Lanny Baron <lnb@FreeBSDsystems.COM> To: Alfred Perlstein <bright@wintelcom.net> Cc: Richard B Mahoney <rbm49@it.canterbury.ac.nz>, freebsd-questions@FreeBSD.ORG Subject: Re: Restricting a users CPU usage -- Possible? Message-ID: <Pine.BSF.4.21.0011231439370.24678-100000@satan.freebsdsystems.com> In-Reply-To: <20001122180523.U18037@fw.wintelcom.net>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi,
Here is how I manage cpu usage for shell users on one of my FreeBSD
Freedom servers:
shell:\
:cputime=30M:\
:datasize-cur=22M:\
:stacksize-cur=8M:\
:memorylocked-cur=10M:\
:memoryuse-cur=30M:\
:filesize=infinity:\
:coredumpsize=infinity:\
:maxproc-cur=6:\
:openfiles-cur=64:\
:priority=10:\
:requirehome@:\
:umask=022:\
:tc=default:
Which is in /etc/login.conf
What you need to do, is make a class inside login.conf and put in there,
the values you want.
Remember to do the following if you change your /etc/login.conf file:
cap_mkdb /etc/login.conf
--Lanny
On Wed, 22 Nov 2000, Alfred Perlstein in the last wild and more than...:
>* Richard B. Mahoney <rbm49@student.canterbury.ac.nz> [001122 17:48] wrote:
>> Dear Readers,
>>
>> I know its possible to restrict user disk storage quotas under FreeBSD
>> but what about a user's CPU usage? I've searched for info on this and
>> have come up empty handed. The reason I ask is as follows.
>[snip]
>
>Well you can limit RAM usage via the login.conf(5) limiting facility.
>
>That ought to keep the programs from getting out of control and
>swamping the box.
>
>> The other day Emacs kept climbing in this way and exceeded the
>> available swap space. The system promptly stepped in and killed it by
>> itself! I was in many ways delighted. Under any other system and a
>> reboot would have been needed.
>
>Maybe we ought to switch the policy of out of memory so that the
>kernel will seek and destroy all emacs processes... :)
>
>--
>-Alfred Perlstein - [bright@wintelcom.net|alfred@freebsd.org]
>"I have the heart of a child; I keep it in a jar on my desk."
>
>
>To Unsubscribe: send mail to majordomo@FreeBSD.org
>with "unsubscribe freebsd-questions" in the body of the message
>
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?Pine.BSF.4.21.0011231439370.24678-100000>
