[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: resource limiting for shell-less processes, nologin user



what about writting a simple shell script, which does the setup of
resource limits to the values you like, and then exec's mysql or
whatever?

On Thu, Aug 01, 2002 at 06:47:24PM +0300, claude wrote:
> Hi, 
> 
> I want to limit resources (cpu, mem) for a process started from rc.local,
> hence not via a login shell.
> Hence shell's ulimit is out of question.
> I know that login.conf is the choice here, but the problem is that the
> user
> (mysql) running this process (mysql server) does not have a valid login
> class
> in /etc/master.passwd (it's a nologin account), as the man login.conf says
> it
> is required.
> So, if I add in login.conf this (for example):
> 
> mysql:\
>         :priority=15:\
>         :cputime=2s:
> 
> after reboot, the above options are ignored.
> I don't want to put them under default:\ because that would affect several
> processes, isn't it ?
> So is it possible to enforce resource limits on a per-process basis,
> processes
> not started by a shell ? How ?
> 
> I run 3.1 release, i386. 

-- 
Denis A. Doroshenko, GPRS engineer
Omnitel Ltd., T. Sevcenkos st. 25, Vilnius, Lithuania
d.doroshenko@omnitel.net, +370 2 262188