]> git.ipfire.org Git - thirdparty/man-pages.git/blobdiff - man7/cgroup_namespaces.7
console_codes.4: Document that \e[1;n] and \e[2;n] support 16 colors
[thirdparty/man-pages.git] / man7 / cgroup_namespaces.7
index 929b3bf1dbe6f7755794f7d762f4aa56bcb070c4..084a92c0860050f99cebf98e082f8cdc772e4c2d 100644 (file)
@@ -23,7 +23,7 @@
 .\" %%%LICENSE_END
 .\"
 .\"
-.TH CGROUP_NAMESPACES 7 2017-09-15 "Linux" "Linux Programmer's Manual"
+.TH CGROUP_NAMESPACES 7 2019-03-06 "Linux" "Linux Programmer's Manual"
 .SH NAME
 cgroup_namespaces \- overview of Linux cgroup namespaces
 .SH DESCRIPTION
@@ -67,9 +67,24 @@ entries for each ancestor level in the cgroup hierarchy.
 .PP
 The following shell session demonstrates the effect of creating
 a new cgroup namespace.
+.PP
 First, (as superuser) we create a child cgroup in the
 .I freezer
-hierarchy, and put the shell into that cgroup:
+hierarchy, and place a process in that cgroup that we will
+use as part of the demonstration below:
+.PP
+.in +4n
+.EX
+# \fBmkdir \-p /sys/fs/cgroup/freezer/sub2\fP
+# \fBsleep 10000 &\fP     # Create a process that lives for a while
+[1] 20124
+# \fBecho 20124 > /sys/fs/cgroup/freezer/sub2/cgroup.procs\fP
+.EE
+.in
+.PP
+We then create another child cgroup in the
+.I freezer
+hierarchy and put the shell into that cgroup:
 .PP
 .in +4n
 .EX
@@ -98,7 +113,7 @@ files of, respectively, the new shell process started by the
 .BR unshare (1)
 command, a process that is in the original cgroup namespace
 .RI ( init ,
-with PID 1), and a process in a sibling cgroup
+with PID 1), and the process in the sibling cgroup
 .RI ( sub2 ):
 .PP
 .EX
@@ -161,14 +176,14 @@ inside this cgroup namespace, after which we see the expected results:
 155 145 0:32 / /sys/fs/cgroup/freezer rw,relatime ...
 .in
 .EE
-.PP
-Use of cgroup namespaces requires a kernel that is configured with the
-.B CONFIG_CGROUPS
-option.
 .\"
 .SH CONFORMING TO
 Namespaces are a Linux-specific feature.
 .SH NOTES
+Use of cgroup namespaces requires a kernel that is configured with the
+.B CONFIG_CGROUPS
+option.
+.PP
 The virtualization provided by cgroup namespaces serves a number of purposes:
 .IP * 2
 It prevents information leaks whereby cgroup directory paths outside of