I have some jails working, but I can't seem to get rctl to apply any settings with them. I looked at the handbook on this and it suggested configuring /etc/login.conf. So I did this on one of my jails, which now contains this:
Basically I just set up these for both root and default hoping one or both would work:
I configured rctl on the host:
Then I added to /boot/loader.conf and rebooted to apply it:
I also configured this in the /etc/rctl.conf of the host:
If I run
However, if I do a restart, it does not show that rctl is running in
I don't see a module for it in the kernel and can't seem to load one:
The limits shown in the output from the rctl command are also not getting applied on the jail in question. Anyone know what I might be missing?
Code:
# egrep -v "^#|^$" /etc/login.conf
default:\
:passwd_format=sha512:\
:copyright=/etc/COPYRIGHT:\
:welcome=/var/run/motd:\
:setenv=BLOCKSIZE=K:\
:mail=/var/mail/$:\
:path=/sbin /bin /usr/sbin /usr/bin /usr/local/sbin /usr/local/bin ~/bin:\
:nologin=/var/run/nologin:\
:cputime=1h:\
:datasize=2G:\
:stacksize=unlimited:\
:memorylocked=64K:\
:memoryuse=512M:\
:filesize=unlimited:\
:coredumpsize=unlimited:\
:openfiles=unlimited:\
:maxproc=50:\
:sbsize=unlimited:\
:vmemoryuse=512M:\
:swapuse=unlimited:\
:pseudoterminals=unlimited:\
:kqueues=unlimited:\
:umtxp=unlimited:\
:priority=0:\
:ignoretime@:\
:umask=022:\
:charset=UTF-8:\
:lang=C.UTF-8:
standard:\
:tc=default:
xuser:\
:tc=default:
staff:\
:tc=default:
daemon:\
:path=/sbin /bin /usr/sbin /usr/bin /usr/local/sbin /usr/local/bin:\
:mail@:\
:memorylocked=128M:\
:tc=default:
news:\
:tc=default:
dialer:\
:tc=default:
root:\
#:ignorenologin:\
#:memorylocked=unlimited:\
:datasize=2G:\
:stacksize=512M:\
:maxproc=50:\
:cputime=1h:\
:memoryuse=512M:\
:vmemoryuse=2G:
:tc=default:
russian|Russian Users Accounts:\
:charset=UTF-8:\
:lang=ru_RU.UTF-8:\
:tc=default:
Basically I just set up these for both root and default hoping one or both would work:
Code:
:maxproc=50:\
:cputime=1h:\
:memoryuse=512M:\
:vmemoryuse=2G:
I configured rctl on the host:
Code:
# sysrc rctl_enable="YES"
rctl_enable: YES -> YES
Then I added to /boot/loader.conf and rebooted to apply it:
Code:
kern.racct.enable="1"
I also configured this in the /etc/rctl.conf of the host:
Code:
$ cat /etc/rctl.conf
jail:www2:memoryuse:deny=512M
jail:www2:vmemoryuse:deny=2G
jail:www2:maxproc:deny=50
If I run
rctl by itself, its seems to pick that up:
Code:
$ rctl
jail:www2:maxproc:deny=50
jail:www2:vmemoryuse:deny=2147483648
jail:www2:memoryuse:deny=536870912
However, if I do a restart, it does not show that rctl is running in
ps faux:
Code:
# service rctl restart
# ps faux | grep restart
root 7917 0.0 0.1 12812 2280 0 S+ 21:11 0:00.08 grep restart
I don't see a module for it in the kernel and can't seem to load one:
Code:
# kldstat | grep -c rctl
0
# kldload rctl
kldload: can't load rctl: No such file or directory
The limits shown in the output from the rctl command are also not getting applied on the jail in question. Anyone know what I might be missing?
Last edited by a moderator: