Debian Codegraph @

templates/man7/cgroup_namespaces.7.pot

raw
1 # SOME DESCRIPTIVE TITLE
2 # Copyright (C) YEAR Free Software Foundation, Inc.
3 # This file is distributed under the same license as the PACKAGE package.
4 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5 #
6 #, fuzzy
7 msgid ""
8 msgstr ""
9 "Project-Id-Version: PACKAGE VERSION\n"
10 "POT-Creation-Date: 2026-06-05 06:20+0200\n"
11 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
12 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13 "Language-Team: LANGUAGE <[email protected]>\n"
14 "Language: \n"
15 "MIME-Version: 1.0\n"
16 "Content-Type: text/plain; charset=UTF-8\n"
17 "Content-Transfer-Encoding: 8bit\n"
18
19 #. type: TH
20 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
21 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
22 #, no-wrap
23 msgid "cgroup_namespaces"
24 msgstr ""
25
26 #. type: TH
27 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
28 #: opensuse-tumbleweed
29 #, no-wrap
30 msgid "2026-02-08"
31 msgstr ""
32
33 #. type: TH
34 #: archlinux debian-unstable
35 #, no-wrap
36 msgid "Linux man-pages 6.18"
37 msgstr ""
38
39 #. type: SH
40 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
41 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
42 #, no-wrap
43 msgid "NAME"
44 msgstr ""
45
46 #. type: Plain text
47 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
48 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
49 msgid "cgroup_namespaces - overview of Linux cgroup namespaces"
50 msgstr ""
51
52 #. type: SH
53 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
54 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
55 #, no-wrap
56 msgid "DESCRIPTION"
57 msgstr ""
58
59 #. type: Plain text
60 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
61 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
62 msgid "For an overview of namespaces, see B<namespaces>(7)."
63 msgstr ""
64
65 #. type: Plain text
66 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
67 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
68 msgid ""
69 "Cgroup namespaces virtualize the view of a process's cgroups (see "
70 "B<cgroups>(7)) as seen via I</proc/>pidI</cgroup> and I</proc/>pidI</"
71 "mountinfo>."
72 msgstr ""
73
74 #. type: Plain text
75 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
76 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
77 msgid ""
78 "Each cgroup namespace has its own set of cgroup root directories. These "
79 "root directories are the base points for the relative locations displayed in "
80 "the corresponding records in the I</proc/>pidI</cgroup> file. When a "
81 "process creates a new cgroup namespace using B<clone>(2) or B<unshare>(2) "
82 "with the B<CLONE_NEWCGROUP> flag, its current cgroups directories become the "
83 "cgroup root directories of the new namespace. (This applies both for the "
84 "cgroups version 1 hierarchies and the cgroups version 2 unified hierarchy.)"
85 msgstr ""
86
87 #. type: Plain text
88 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
89 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
90 msgid ""
91 "When reading the cgroup memberships of a \"target\" process from I</proc/"
92 ">pidI</cgroup>, the pathname shown in the third field of each record will be "
93 "relative to the reading process's root directory for the corresponding "
94 "cgroup hierarchy. If the cgroup directory of the target process lies "
95 "outside the root directory of the reading process's cgroup namespace, then "
96 "the pathname will show I<../> entries for each ancestor level in the cgroup "
97 "hierarchy."
98 msgstr ""
99
100 #. type: Plain text
101 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
102 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
103 msgid ""
104 "The following shell session demonstrates the effect of creating a new cgroup "
105 "namespace."
106 msgstr ""
107
108 #. type: Plain text
109 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
110 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
111 msgid ""
112 "First, (as superuser) in a shell in the initial cgroup namespace, we create "
113 "a child cgroup in the I<freezer> hierarchy, and place a process in that "
114 "cgroup that we will use as part of the demonstration below:"
115 msgstr ""
116
117 #. type: Plain text
118 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
119 #: opensuse-tumbleweed
120 #, no-wrap
121 msgid ""
122 "#B< mkdir -p /sys/fs/cgroup/freezer/sub2>;\n"
123 "#B< sleep 10000 &> # Create a process that lives for a while\n"
124 "[1] 20124\n"
125 "#B< echo 20124 E<gt> /sys/fs/cgroup/freezer/sub2/cgroup.procs>;\n"
126 msgstr ""
127
128 #. type: Plain text
129 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
130 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
131 msgid ""
132 "We then create another child cgroup in the I<freezer> hierarchy and put the "
133 "shell into that cgroup:"
134 msgstr ""
135
136 #. type: Plain text
137 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
138 #: opensuse-tumbleweed
139 #, no-wrap
140 msgid ""
141 "#B< mkdir -p /sys/fs/cgroup/freezer/sub>;\n"
142 "#B< echo $$>; # Show PID of this shell\n"
143 "30655\n"
144 "#B< echo 30655 E<gt> /sys/fs/cgroup/freezer/sub/cgroup.procs>;\n"
145 "#B< cat /proc/self/cgroup | grep freezer>;\n"
146 "7:freezer:/sub\n"
147 msgstr ""
148
149 #. type: Plain text
150 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
151 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
152 msgid ""
153 "Next, we use B<unshare>(1) to create a process running a new shell in new "
154 "cgroup and mount namespaces:"
155 msgstr ""
156
157 #. type: Plain text
158 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
159 #: opensuse-tumbleweed
160 #, no-wrap
161 msgid "#B< PS1='sh2# ' unshare -Cm bash>;\n"
162 msgstr ""
163
164 #. type: Plain text
165 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
166 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
167 msgid ""
168 "From the new shell started by B<unshare>(1), we then inspect the I</proc/"
169 ">pidI</cgroup> files of, respectively, the new shell, a process that is in "
170 "the initial cgroup namespace (I<init>, with PID 1), and the process in the "
171 "sibling cgroup (I<sub2>):"
172 msgstr ""
173
174 #. type: Plain text
175 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
176 #: opensuse-tumbleweed
177 #, no-wrap
178 msgid ""
179 "sh2#B< cat /proc/self/cgroup | grep freezer>;\n"
180 "7:freezer:/\n"
181 "sh2#B< cat /proc/1/cgroup | grep freezer>;\n"
182 "7:freezer:/..\n"
183 "sh2#B< cat /proc/20124/cgroup | grep freezer>;\n"
184 "7:freezer:/../sub2\n"
185 msgstr ""
186
187 #. type: Plain text
188 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
189 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
190 msgid ""
191 "From the output of the first command, we see that the freezer cgroup "
192 "membership of the new shell (which is in the same cgroup as the initial "
193 "shell) is shown defined relative to the freezer cgroup root directory that "
194 "was established when the new cgroup namespace was created. (In absolute "
195 "terms, the new shell is in the I</sub> freezer cgroup, and the root "
196 "directory of the freezer cgroup hierarchy in the new cgroup namespace is "
197 "also I</sub>. Thus, the new shell's cgroup membership is displayed as \\"
198 "[aq]/\\[aq].)"
199 msgstr ""
200
201 #. type: Plain text
202 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
203 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
204 msgid ""
205 "However, when we look in I</proc/self/mountinfo> we see the following "
206 "anomaly:"
207 msgstr ""
208
209 #. type: Plain text
210 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
211 #: opensuse-tumbleweed
212 #, no-wrap
213 msgid ""
214 "sh2#B< cat /proc/self/mountinfo | grep freezer>;\n"
215 "155 145 0:32 /..\\& /sys/fs/cgroup/freezer ...\n"
216 msgstr ""
217
218 #. type: Plain text
219 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
220 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
221 msgid ""
222 "The fourth field of this line (I</..>) should show the directory in the "
223 "cgroup filesystem which forms the root of this mount. Since by the "
224 "definition of cgroup namespaces, the process's current freezer cgroup "
225 "directory became its root freezer cgroup directory, we should see \\[aq]/\\"
226 "[aq] in this field. The problem here is that we are seeing a mount entry "
227 "for the cgroup filesystem corresponding to the initial cgroup namespace "
228 "(whose cgroup filesystem is indeed rooted at the parent directory of "
229 "I<sub>). To fix this problem, we must remount the freezer cgroup filesystem "
230 "from the new shell (i.e., perform the mount from a process that is in the "
231 "new cgroup namespace), after which we see the expected results:"
232 msgstr ""
233
234 #. type: Plain text
235 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
236 #: opensuse-tumbleweed
237 #, no-wrap
238 msgid ""
239 "sh2#B< mount --make-rslave />; # Don\\[aq]t propagate mount events\n"
240 " # to other namespaces\n"
241 "sh2#B< umount /sys/fs/cgroup/freezer>;\n"
242 "sh2#B< mount -t cgroup -o freezer freezer /sys/fs/cgroup/freezer>;\n"
243 "sh2#B< cat /proc/self/mountinfo | grep freezer>;\n"
244 "155 145 0:32 / /sys/fs/cgroup/freezer rw,relatime ...\n"
245 msgstr ""
246
247 #. type: SH
248 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
249 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
250 #, no-wrap
251 msgid "STANDARDS"
252 msgstr ""
253
254 #. type: Plain text
255 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
256 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
257 msgid "Linux."
258 msgstr ""
259
260 #. type: SH
261 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
262 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
263 #, no-wrap
264 msgid "NOTES"
265 msgstr ""
266
267 #. type: Plain text
268 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
269 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
270 msgid ""
271 "Use of cgroup namespaces requires a kernel that is configured with the "
272 "B<CONFIG_CGROUPS> option."
273 msgstr ""
274
275 #. type: Plain text
276 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
277 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
278 msgid ""
279 "The virtualization provided by cgroup namespaces serves a number of purposes:"
280 msgstr ""
281
282 #. type: IP
283 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
284 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
285 #, no-wrap
286 msgid "\\[bu]"
287 msgstr ""
288
289 #. type: Plain text
290 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
291 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
292 msgid ""
293 "It prevents information leaks whereby cgroup directory paths outside of a "
294 "container would otherwise be visible to processes in the container. Such "
295 "leakages could, for example, reveal information about the container "
296 "framework to containerized applications."
297 msgstr ""
298
299 #. type: Plain text
300 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
301 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
302 msgid ""
303 "It eases tasks such as container migration. The virtualization provided by "
304 "cgroup namespaces allows containers to be isolated from knowledge of the "
305 "pathnames of ancestor cgroups. Without such isolation, the full cgroup "
306 "pathnames (displayed in I</proc/self/cgroups>) would need to be replicated "
307 "on the target system when migrating a container; those pathnames would also "
308 "need to be unique, so that they don't conflict with other pathnames on the "
309 "target system."
310 msgstr ""
311
312 #. type: Plain text
313 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
314 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
315 msgid ""
316 "It allows better confinement of containerized processes, because it is "
317 "possible to mount the container's cgroup filesystems such that the container "
318 "processes can't gain access to ancestor cgroup directories. Consider, for "
319 "example, the following scenario:"
320 msgstr ""
321
322 #. type: Plain text
323 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
324 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
325 msgid "We have a cgroup directory, I</cg/1>, that is owned by user ID 9000."
326 msgstr ""
327
328 #. type: Plain text
329 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
330 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
331 msgid ""
332 "We have a process, I<X>, also owned by user ID 9000, that is namespaced "
333 "under the cgroup I</cg/1/2> (i.e., I<X> was placed in a new cgroup namespace "
334 "via B<clone>(2) or B<unshare>(2) with the B<CLONE_NEWCGROUP> flag)."
335 msgstr ""
336
337 #. type: Plain text
338 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
339 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
340 msgid ""
341 "In the absence of cgroup namespacing, because the cgroup directory I</cg/1> "
342 "is owned (and writable) by UID 9000 and process I<X> is also owned by user "
343 "ID 9000, process I<X> would be able to modify the contents of cgroups files "
344 "(i.e., change cgroup settings) not only in I</cg/1/2> but also in the "
345 "ancestor cgroup directory I</cg/1>. Namespacing process I<X> under the "
346 "cgroup directory I</cg/1/2>, in combination with suitable mount operations "
347 "for the cgroup filesystem (as shown above), prevents it modifying files in "
348 "I</cg/1>, since it cannot even see the contents of that directory (or of "
349 "further removed cgroup ancestor directories). Combined with correct "
350 "enforcement of hierarchical limits, this prevents process I<X> from escaping "
351 "the limits imposed by ancestor cgroups."
352 msgstr ""
353
354 #. type: SH
355 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
356 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
357 #, no-wrap
358 msgid "SEE ALSO"
359 msgstr ""
360
361 #. type: Plain text
362 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
363 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
364 msgid ""
365 "B<unshare>(1), B<clone>(2), B<setns>(2), B<unshare>(2), B<proc>(5), "
366 "B<cgroups>(7), B<credentials>(7), B<namespaces>(7), B<user_namespaces>(7)"
367 msgstr ""
368
369 #. type: TH
370 #: debian-trixie fedora-44 fedora-rawhide
371 #, no-wrap
372 msgid "2024-05-02"
373 msgstr ""
374
375 #. type: TH
376 #: debian-trixie
377 #, no-wrap
378 msgid "Linux man-pages 6.9.1"
379 msgstr ""
380
381 #. type: Plain text
382 #: debian-trixie fedora-44 fedora-rawhide
383 #, no-wrap
384 msgid ""
385 "# B<mkdir -p /sys/fs/cgroup/freezer/sub2>\n"
386 "# B<sleep 10000 &> # Create a process that lives for a while\n"
387 "[1] 20124\n"
388 "# B<echo 20124 E<gt> /sys/fs/cgroup/freezer/sub2/cgroup.procs>\n"
389 msgstr ""
390
391 #. type: Plain text
392 #: debian-trixie fedora-44 fedora-rawhide
393 #, no-wrap
394 msgid ""
395 "# B<mkdir -p /sys/fs/cgroup/freezer/sub>\n"
396 "# B<echo $$> # Show PID of this shell\n"
397 "30655\n"
398 "# B<echo 30655 E<gt> /sys/fs/cgroup/freezer/sub/cgroup.procs>\n"
399 "# B<cat /proc/self/cgroup | grep freezer>\n"
400 "7:freezer:/sub\n"
401 msgstr ""
402
403 #. type: Plain text
404 #: debian-trixie fedora-44 fedora-rawhide
405 #, no-wrap
406 msgid "# B<PS1=\"sh2# \" unshare -Cm bash>\n"
407 msgstr ""
408
409 #. type: Plain text
410 #: debian-trixie fedora-44 fedora-rawhide
411 #, no-wrap
412 msgid ""
413 "sh2# B<cat /proc/self/cgroup | grep freezer>\n"
414 "7:freezer:/\n"
415 "sh2# B<cat /proc/1/cgroup | grep freezer>\n"
416 "7:freezer:/..\n"
417 "sh2# B<cat /proc/20124/cgroup | grep freezer>\n"
418 "7:freezer:/../sub2\n"
419 msgstr ""
420
421 #. type: Plain text
422 #: debian-trixie fedora-44 fedora-rawhide
423 #, no-wrap
424 msgid ""
425 "sh2# B<cat /proc/self/mountinfo | grep freezer>\n"
426 "155 145 0:32 /.. /sys/fs/cgroup/freezer ...\n"
427 msgstr ""
428
429 #. type: Plain text
430 #: debian-trixie fedora-44 fedora-rawhide
431 #, no-wrap
432 msgid ""
433 "sh2# B<mount --make-rslave /> # Don\\[aq]t propagate mount events\n"
434 " # to other namespaces\n"
435 "sh2# B<umount /sys/fs/cgroup/freezer>\n"
436 "sh2# B<mount -t cgroup -o freezer freezer /sys/fs/cgroup/freezer>\n"
437 "sh2# B<cat /proc/self/mountinfo | grep freezer>\n"
438 "155 145 0:32 / /sys/fs/cgroup/freezer rw,relatime ...\n"
439 msgstr ""
440
441 #. type: TH
442 #: fedora-44 fedora-rawhide
443 #, no-wrap
444 msgid "Linux man-pages 6.13"
445 msgstr ""
446
447 #. type: TH
448 #: mageia-cauldron
449 #, no-wrap
450 msgid "Linux man-pages 6.17"
451 msgstr ""
452
453 #. type: TH
454 #: opensuse-leap-16-1 opensuse-tumbleweed
455 #, no-wrap
456 msgid "Linux man-pages (unreleased)"
457 msgstr ""