Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 03 Mar 2011 11:52:03 +0300
From:      Alex Keda <admin@lissyara.su>
To:        current@FreeBSD.org
Subject:   login.conf: maxproc does not work when command running from cron?
Message-ID:  <4D6F56B3.2020302@lissyara.su>

next in thread | raw e-mail | index | archive | help
I create login class:
lissyara# grep id100 --after-context=7 /etc/login.conf
id100:\
         :coredumpsize=1:\
         :cputime=60s:\
         :maxproc=12:\
         :openfiles=32:\
         :priority=20:\
         :tc=default:

lissyara#

then, run command:

lissyara# cap_mkdb -v /etc/login.conf
cap_mkdb: 10 capability records
lissyara#

add user:

lissyara# grep ^test1234 /etc/master.passwd
test1234:$1$kj/WOTuN$vLGcOBPv9ro8eljOe.ChA1:1002:1004:id100:0:0:User 
&:/home/test1234:/bin/sh
lissyara#

add cron job for user:

lissyara# crontab -l -u test1234
* * * * * /bin/sleep 72000
* * * * * /bin/sleep 72000
* * * * * /bin/sleep 72000
* * * * * /bin/sleep 72000
* * * * * /bin/sleep 72000
* * * * * /bin/sleep 72000
* * * * * /bin/sleep 72000
* * * * * /bin/sleep 72000
* * * * * /bin/sleep 72000
* * * * * /bin/sleep 72000
* * * * * /bin/sleep 72000
* * * * * /bin/sleep 72000
* * * * * /bin/sleep 72000
lissyara#

after some time I see lot sleep processes in ps output

lissyara# ps -auxww | grep ^test1234 | grep sleep | wc -l
      130
lissyara#

130 > 12

========
If I running commands from ssh session - all OK, I cannot run more than 
maxproc processes...

tested on 8.1 (i386), 8.2 (i386), -CURRENT (amd64)




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