aboutsummaryrefslogtreecommitdiffstats
path: root/man7/cgroup_namespaces.7
diff options
context:
space:
mode:
authorMichael Kerrisk <mtk.manpages@gmail.com>2017-08-19 10:56:06 +0200
committerMichael Kerrisk <mtk.manpages@gmail.com>2017-08-19 13:47:27 +0200
commit9c40f2b9ba935b423a6c31ec4c252c3afdee696c (patch)
tree34b69daa340b0902f39c0bbbeeee84e53efecdbb /man7/cgroup_namespaces.7
parent010c75a2bbe2768e27998d476da04f0b23084234 (diff)
downloadman-pages-9c40f2b9ba935b423a6c31ec4c252c3afdee696c.tar.gz
random.4, gai.conf.5, slabinfo.5, cgroup_namespaces.7, feature_test_macros.7, keyrings.7, locale.7, man-pages.7, sock_diag.7: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Diffstat (limited to 'man7/cgroup_namespaces.7')
-rw-r--r--man7/cgroup_namespaces.78
1 files changed, 0 insertions, 8 deletions
diff --git a/man7/cgroup_namespaces.7 b/man7/cgroup_namespaces.7
index f2ad7c343b..959ce01690 100644
--- a/man7/cgroup_namespaces.7
+++ b/man7/cgroup_namespaces.7
@@ -88,13 +88,11 @@ Next, we use
.BR unshare (1)
to create a process running a new shell in new cgroup and mount namespaces:
.PP
-.nf
.EX
.in +4n
# \fBunshare \-Cm bash\fP
.in
.EE
-.fi
.PP
We then inspect the
.IR /proc/[pid]/cgroup
@@ -105,7 +103,6 @@ command, a process that is in the original cgroup namespace
with PID 1), and a process in a sibling cgroup
.RI ( sub2 ):
.PP
-.nf
.EX
.in +4n
$ \fBcat /proc/self/cgroup | grep freezer\fP
@@ -116,7 +113,6 @@ $ \fBcat /proc/20124/cgroup | grep freezer\fP
7:freezer:/../sub2
.in
.EE
-.fi
.PP
From the output of the first command,
we see that the freezer cgroup membership of the new shell
@@ -136,14 +132,12 @@ However, when we look in
.IR /proc/self/mountinfo
we see the following anomaly:
.PP
-.nf
.EX
.in +4n
# \fBcat /proc/self/mountinfo | grep freezer\fP
155 145 0:32 /.. /sys/fs/cgroup/freezer ...
.in
.EE
-.fi
.PP
The fourth field of this line
.RI ( /.. )
@@ -159,7 +153,6 @@ filesystem corresponding to our initial shell process's cgroup namespace
We need to remount the freezer cgroup filesystem
inside this cgroup namespace, after which we see the expected results:
.PP
-.nf
.EX
.in +4n
# \fBmount \-\-make\-rslave /\fP # Don't propagate mount events
@@ -170,7 +163,6 @@ inside this cgroup namespace, after which we see the expected results:
155 145 0:32 / /sys/fs/cgroup/freezer rw,relatime ...
.in
.EE
-.fi
.PP
Use of cgroup namespaces requires a kernel that is configured with the
.B CONFIG_CGROUPS