This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
технология_namespaces [2017/12/05 08:36] val |
технология_namespaces [2017/12/05 09:14] val |
||
---|---|---|---|
Line 2: | Line 2: | ||
* [[https://habrahabr.ru/company/selectel/blog/279281/|Механизмы контейнеризации: namespaces]] | * [[https://habrahabr.ru/company/selectel/blog/279281/|Механизмы контейнеризации: namespaces]] | ||
- | * [[https://habrahabr.ru/company/selectel/blog/303190/|Механизмы контейнеризации: cgroups]] | ||
* [[https://blogs.rdoproject.org/7761/hands-on-linux-sandbox-with-namespaces-and-cgroups|Hands on Linux sandbox with namespaces and cgroups]] | * [[https://blogs.rdoproject.org/7761/hands-on-linux-sandbox-with-namespaces-and-cgroups|Hands on Linux sandbox with namespaces and cgroups]] | ||
<code> | <code> | ||
- | # ls /sys/fs/cgroup/ | + | # unshare --pid --mount-proc=/proc --fork su -l user1 |
- | # mkdir /sys/fs/cgroup/memory/group0 | + | $ ps ax |
- | + | ||
- | # echo $$ > /sys/fs/cgroup/memory/group0/tasks | + | |
- | + | ||
- | # echo 1M > /sys/fs/cgroup/memory/group0/memory.limit_in_bytes | + | |
- | + | ||
- | # apt install stress | + | |
</code> | </code> |