Я пока со старой версией патча играюсь.
Вот такая картинка:
Код: Выделить всё
# jls
JID IP Address Hostname Path
5 10.10.10.2 jail2.d.lv /usr/local/jails/jail2
6 10.10.10.1 jail1.d.lv /usr/local/jails/jail1
В каждой клетке запущено несколько
в материнской системе видно:
Код: Выделить всё
# ./jget 6
Jail limits and rusage, jid = 6
Limits: CPU 10, MEM 64M, NPROC 256, NOFILE 1024
Usage: CPU 95, MEM 11M, NPROC 10, NOFILE 63
# ./jget 5
Jail limits and rusage, jid = 5
Limits: CPU 10, MEM 64M, NPROC 256, NOFILE 1024
Usage: CPU 77, MEM 10M, NPROC 9, NOFILE 58
Код: Выделить всё
last pid: 67523; load averages: 6.85, 6.69, 5.37 up 0+03:04:43 12:50:22
44 processes: 8 running, 36 sleeping
CPU: 4.4% user, 0.0% nice, 95.6% system, 0.0% interrupt, 0.0% idle
Mem: 79M Active, 98M Inact, 50M Wired, 5304K Cache, 34M Buf, 5792K Free
Swap: 2048M Total, 2048M Free
PID JID USERNAME THR PRI NICE SIZE RES STATE C TIME WCPU COMMAND
67422 5 root 1 99 0 3232K 1320K RUN 1 4:20 9.96% dd
67424 5 root 1 99 0 3232K 1320K RUN 0 4:10 9.96% dd
67423 5 root 1 99 0 3232K 1320K RUN 1 4:07 9.96% dd
67460 6 root 1 99 0 3232K 1320K RUN 0 2:53 9.96% dd
67462 6 root 1 99 0 3232K 1320K RUN 1 2:49 9.96% dd
67461 6 root 1 98 0 3232K 1320K CPU1 1 2:48 9.96% dd
67459 6 root 1 99 0 3232K 1320K RUN 0 2:42 9.96% dd
33716 0 root 1 44 0 3624K 1760K select 0 0:05 0.00% top
65817 0 root 1 44 0 9344K 4604K select 0 0:02 0.00% sshd
65820 0 root 1 44 0 4504K 2168K wait 0 0:01 0.00% bash
1203 0 root 1 44 0 4504K 1964K wait 1 0:00 0.00% bash
1143 0 root 1 44 0 3396K 1144K select 1 0:00 0.00% moused
67407 0 root 1 44 0 6368K 4000K select 1 0:00 0.00% ssh
67437 0 root 1 44 0 9344K 4708K select 0 0:00 0.00% sshd
583 0 root 1 44 0 3292K 1252K select 0 0:00 0.00% syslogd
67408 5 root 1 44 0 9344K 4204K select 0 0:00 0.00% sshd
823 0 root 1 48 0 3320K 1268K nanslp 0 0:00 0.00% cron
814 0 root 1 44 0 6620K 3168K select 1 0:00 0.00% sshd
67425 5 root 1 44 0 3624K 1940K select 0 0:00 0.00% top
67442 6 root 1 44 0 9344K 4904K select 0 0:00 0.00% sshd
13246 0 root 1 44 0 4504K 1992K ttyin 0 0:00 0.00% bash
1197 0 root 1 45 0 3756K 1520K wait 0 0:00 0.00% login
67411 5 root 1 44 0 4612K 2792K pause 0 0:00 0.00% csh
67441 0 root 1 44 0 6368K 4004K select 1 0:00 0.00% ssh
67506 6 root 1 44 0 3624K 1968K select 0 0:00 0.00% top
1196 0 root 1 45 0 3756K 1520K wait 1 0:00 0.00% login
67454 6 root 1 44 0 3588K 2680K pause 1 0:00 0.00% csh
1395 0 root 1 44 0 4504K 1856K wait 1 0:00 0.00% bash
476 0 root 1 44 0 1888K 440K select 0 0:00 0.00% devd
1198 0 root 1 44 0 3756K 1532K wait 0 0:00 0.00% login
67099 5 root 1 44 0 6620K 3920K select 1 0:00 0.00% sshd
67440 0 root 1 44 0 4504K 2316K wait 0 0:00 0.00% bash
66993 5 root 1 44 0 3292K 1516K select 1 0:00 0.00% syslogd
67108 5 root 1 45 0 3320K 1552K nanslp 1 0:00 0.00% cron
67362 6 root 1 45 0 3320K 1552K nanslp 0 0:00 0.00% cron
67247 6 root 1 44 0 3292K 1516K select 0 0:00 0.00% syslogd
в материнской системе сделаны классы в login.conf
Код: Выделить всё
jail64:\
:cputime=10:\
:memoryuse=64M:\
:maxproc=256:\
:openfiles=1024:\
:tc=default:
jail128:\
:cputime=10:\
:memoryuse=128M:\
:maxproc=256:\
:openfiles=1024:\
:tc=default:
если остановить процессы в jail2 то в материнской видно:
Код: Выделить всё
last pid: 67527; load averages: 3.77, 5.23, 5.39 up 0+03:09:10 12:54:49
40 processes: 5 running, 35 sleeping
CPU: 5.2% user, 0.0% nice, 94.8% system, 0.0% interrupt, 0.0% idle
Mem: 77M Active, 98M Inact, 50M Wired, 5304K Cache, 34M Buf, 8648K Free
Swap: 2048M Total, 2048M Free
PID JID USERNAME THR PRI NICE SIZE RES STATE C TIME WCPU COMMAND
67459 6 root 1 102 0 3232K 1320K RUN 0 4:27 29.98% dd
67462 6 root 1 102 0 3232K 1320K RUN 0 4:26 29.98% dd
67460 6 root 1 101 0 3232K 1320K RUN 0 4:20 19.97% dd
67461 6 root 1 99 0 3232K 1320K CPU0 1 4:21 9.96% dd
33716 0 root 1 44 0 3624K 1760K select 0 0:06 0.00% top
65817 0 root 1 44 0 9344K 4604K select 0 0:02 0.00% sshd
65820 0 root 1 44 0 4504K 2168K wait 1 0:01 0.00% bash
1203 0 root 1 44 0 4504K 1964K wait 1 0:00 0.00% bash
67437 0 root 1 44 0 9344K 4708K select 0 0:00 0.00% sshd
67407 0 root 1 44 0 6368K 4000K select 1 0:00 0.00% ssh
1143 0 root 1 45 0 3396K 1144K select 1 0:00 0.00% moused
67408 5 root 1 44 0 9344K 4204K select 1 0:00 0.00% sshd
583 0 root 1 44 0 3292K 1252K select 0 0:00 0.00% syslogd
823 0 root 1 44 0 3320K 1268K nanslp 1 0:00 0.00% cron
814 0 root 1 44 0 6620K 3168K select 1 0:00 0.00% sshd
67442 6 root 1 44 0 9344K 4904K select 1 0:00 0.00% sshd
67441 0 root 1 44 0 6368K 4004K select 0 0:00 0.00% ssh
67411 5 root 1 44 0 4612K 2888K ttyin 1 0:00 0.00% csh
13246 0 root 1 44 0 4504K 1992K ttyin 0 0:00 0.00% bash
1197 0 root 1 45 0 3756K 1520K wait 0 0:00 0.00% login
1196 0 root 1 45 0 3756K 1520K wait 1 0:00 0.00% login
67454 6 root 1 44 0 3588K 2680K pause 1 0:00 0.00% csh
1395 0 root 1 44 0 4504K 1856K wait 1 0:00 0.00% bash
476 0 root 1 44 0 1888K 440K select 0 0:00 0.00% devd
1198 0 root 1 44 0 3756K 1532K wait 0 0:00 0.00% login
67526 6 root 1 44 0 3624K 1968K select 0 0:00 0.00% top
66993 5 root 1 44 0 3292K 1516K select 1 0:00 0.00% syslogd
67099 5 root 1 44 0 6620K 3920K select 1 0:00 0.00% sshd
67247 6 root 1 44 0 3292K 1516K select 1 0:00 0.00% syslogd
67440 0 root 1 44 0 4504K 2316K wait 0 0:00 0.00% bash
67108 5 root 1 44 0 3320K 1552K nanslp 1 0:00 0.00% cron
67362 6 root 1 44 0 3320K 1552K nanslp 0 0:00 0.00% cron
67527 0 root 1 44 0 3624K 1956K CPU1 0 0:00 0.00% top
1200 0 root 1 72 0 3292K 1120K ttyin 1 0:00 0.00% getty
1201 0 root 1 76 0 3292K 1120K ttyin 1 0:00 0.00% getty
1199 0 root 1 72 0 3292K 1120K ttyin 1 0:00 0.00% getty
Код: Выделить всё
# ./jget 5
Jail limits and rusage, jid = 5
Limits: CPU 10, MEM 64M, NPROC 256, NOFILE 1024
Usage: CPU 0, MEM 7M, NPROC 5, NOFILE 38
# ./jget 6
Jail limits and rusage, jid = 6
Limits: CPU 10, MEM 64M, NPROC 256, NOFILE 1024
Usage: CPU 124, MEM 11M, NPROC 10, NOFILE 63
че не так?