/systemd-251/test/test-umount/ ! |
D | rhbug-1554943.mountinfo | 8 25 18 0:22 / /sys/fs/cgroup ro,nosuid,nodev,noexec shared:4 - tmpfs tmpfs ro,mode=755 9 26 25 0:23 / /sys/fs/cgroup/unified rw,nosuid,nodev,noexec,relatime shared:5 - cgroup2 cgroup rw 10 27 25 0:24 / /sys/fs/cgroup/systemd rw,nosuid,nodev,noexec,relatime shared:6 - cgroup cgroup rw,xat… 12 29 25 0:26 / /sys/fs/cgroup/cpu,cpuacct rw,nosuid,nodev,noexec,relatime shared:7 - cgroup cgroup rw… 13 30 25 0:27 / /sys/fs/cgroup/perf_event rw,nosuid,nodev,noexec,relatime shared:8 - cgroup cgroup rw,… 14 31 25 0:28 / /sys/fs/cgroup/freezer rw,nosuid,nodev,noexec,relatime shared:9 - cgroup cgroup rw,fre… 15 32 25 0:29 / /sys/fs/cgroup/hugetlb rw,nosuid,nodev,noexec,relatime shared:10 - cgroup cgroup rw,hu… 16 33 25 0:30 / /sys/fs/cgroup/cpuset rw,nosuid,nodev,noexec,relatime shared:11 - cgroup cgroup rw,cpu… 17 34 25 0:31 / /sys/fs/cgroup/net_cls,net_prio rw,nosuid,nodev,noexec,relatime shared:12 - cgroup cgr… 18 35 25 0:32 / /sys/fs/cgroup/memory rw,nosuid,nodev,noexec,relatime shared:13 - cgroup cgroup rw,mem… [all …]
|
/systemd-251/test/units/ ! |
D | testsuite-38.sh | 106 grep -q "frozen $2" /sys/fs/cgroup/system.slice/"$1"/cgroup.events 229 grep -q "frozen 1" /sys/fs/cgroup/"${slice}"/cgroup.events 230 grep -q "frozen 1" /sys/fs/cgroup/"${slice}"/"${unit}"/cgroup.events 237 grep -q "frozen 0" /sys/fs/cgroup/"${slice}"/cgroup.events 238 grep -q "frozen 0" /sys/fs/cgroup/"${slice}"/"${unit}"/cgroup.events 256 echo 1 >/sys/fs/cgroup/"${slice}"/cgroup.freeze 265 grep -q "frozen 1" /sys/fs/cgroup/"${slice}"/cgroup.events 266 grep -q "frozen 1" /sys/fs/cgroup/"${slice}"/"${unit}"/cgroup.events 270 echo 0 >/sys/fs/cgroup/"${slice}"/cgroup.freeze 275 grep -q "frozen 0" /sys/fs/cgroup/"${slice}"/cgroup.events [all …]
|
D | testsuite-56.sh | 7 cat >/tmp/test56-exit-cgroup.sh <<EOF 26 chmod +x /tmp/test56-exit-cgroup.sh 29 systemd-run --wait --unit=one -p Type=notify -p ExitType=cgroup \ 30 /tmp/test56-exit-cgroup.sh 'systemctl stop one' 33 systemd-run --wait --unit=two -p Type=notify -p ExitType=cgroup \ 35 /tmp/test56-exit-cgroup.sh 'systemctl stop two' 38 systemd-run --wait --unit=three -p Type=notify -p ExitType=cgroup \ 40 /tmp/test56-exit-cgroup.sh \ 44 systemd-run --wait --unit=four -p Type=notify -p ExitType=cgroup \ 45 /tmp/test56-exit-cgroup.sh 'systemctl kill --signal 9 four' \ [all …]
|
D | testsuite-19.sh | 8 test -w /sys/fs/cgroup/system.slice/test0.service/ -a \ 9 -w /sys/fs/cgroup/system.slice/test0.service/cgroup.procs -a \ 10 -w /sys/fs/cgroup/system.slice/test0.service/cgroup.subtree_control 13 grep -q memory /sys/fs/cgroup/system.slice/test1.service/cgroup.controllers 16 grep -q pids /sys/fs/cgroup/system.slice/test2.service/cgroup.controllers 19 grep -qv io /sys/fs/cgroup/system.slice/cgroup.controllers 23 …grep -q io /sys/fs/cgroup/system.slice/system-foo.slice/system-foo-bar.slice/system-foo-bar-baz.sl… 33 grep -qv io /sys/fs/cgroup/system.slice/cgroup.controllers
|
/systemd-251/docs/ ! |
D | CGROUP_DELEGATION.md | 11 cgroup access, such as container managers and similar.* 27 [unified cgroup hierarchy](https://www.kernel.org/doc/html/latest/admin-guide/cgroup-v2.html). 44 design ideas of cgroup v2 (which we however try to adapt as far as we can to 45 cgroup v1 too). Specifically two cgroup v2 rules are the most relevant: 48 to have processes directly attached to a cgroup that also has child cgroups and 49 vice versa. A cgroup is either an inner node or a leaf node of the tree, and if 52 exceptions to this rule, though. E.g. the root cgroup is special and allows 56 2. The **single-writer** rule: this means that each cgroup only has a single 59 specific cgroup, and when it does that ownership is exclusive, and nothing else 64 your container manager creates and manages cgroups in the system's root cgroup [all …]
|
D | CONTAINER_INTERFACE.md | 48 cgroup controller — on cgroupv1 — so that no other devices but these may be 66 6. Either pre-mount all cgroup hierarchies in full into the container, or leave 69 is incompatible with `/proc/$PID/cgroup` (which lists full paths). Also the 70 root-level cgroup directories tend to be quite different from inner 73 the cgroup sub-tree the container runs in. It's also a good idea to mount 77 cgroup sub-tree of the container itself (on cgroupv2 in the unified 86 it. This ensures that the unit you created will be part of all cgroup 89 cgroup path systemd put your process in for all operations of the container. 90 Do not add new cgroup directories to the top of the tree. This will not only 188 5. Container managers should stay away from the cgroup hierarchy outside of the [all …]
|
/systemd-251/src/oom/ ! |
D | test-oomd-util.c | 42 _cleanup_free_ char *cgroup_root = NULL, *cgroup = NULL; in test_oomd_cgroup_kill() local 56 cgroup = path_join(cgroup_root, "oomdkilltest"); in test_oomd_cgroup_kill() 57 assert_se(cgroup); in test_oomd_cgroup_kill() 58 assert_se(cg_create(SYSTEMD_CGROUP_CONTROLLER, cgroup) >= 0); in test_oomd_cgroup_kill() 61 r = cg_set_xattr(SYSTEMD_CGROUP_CONTROLLER, cgroup, "user.oomd_test", "test", 4, 0); in test_oomd_cgroup_kill() 71 assert_se(cg_attach(SYSTEMD_CGROUP_CONTROLLER, cgroup, pid[j]) >= 0); in test_oomd_cgroup_kill() 74 r = oomd_cgroup_kill(cgroup, false /* recurse */, false /* dry run */); in test_oomd_cgroup_kill() 76 log_debug_errno(r, "Failed to kill processes under %s: %m", cgroup); in test_oomd_cgroup_kill() 80 … assert_se(cg_get_xattr_malloc(SYSTEMD_CGROUP_CONTROLLER, cgroup, "user.oomd_ooms", &v) >= 0); in test_oomd_cgroup_kill() 86 assert_se(cg_is_empty(SYSTEMD_CGROUP_CONTROLLER, cgroup) == true); in test_oomd_cgroup_kill() [all …]
|
/systemd-251/src/test/ ! |
D | test-bpf-devices.c | 253 _cleanup_free_ char *cgroup = NULL, *parent = NULL; in main() local 272 r = enter_cgroup_subroot(&cgroup); in main() 281 r = cg_get_path(SYSTEMD_CGROUP_CONTROLLER, cgroup, NULL, &controller_path); in main() 286 test_policy_closed(cgroup, &prog); in main() 287 test_policy_strict(cgroup, &prog); in main() 289 test_policy_allow_list_major("mem", cgroup, &prog); in main() 290 test_policy_allow_list_major("1", cgroup, &prog); in main() 292 test_policy_allow_list_major_star('c', cgroup, &prog); in main() 293 test_policy_allow_list_major_star('b', cgroup, &prog); in main() 295 test_policy_empty(false, cgroup, &prog); in main() [all …]
|
D | meson.build | 499 [files('test-cgroup.c')], 501 [files('test-cgroup-cpu.c'), 507 [files('test-cgroup-unit-default.c'), 513 [files('test-cgroup-mask.c'), 528 [files('test-cgroup-util.c')], 530 [files('test-cgroup-setup.c')],
|
/systemd-251/src/basic/ ! |
D | cgroup-util.c | 1046 int cg_shift_path(const char *cgroup, const char *root, const char **shifted) { in cg_shift_path() argument 1051 assert(cgroup); in cg_shift_path() 1065 p = path_startswith(cgroup, root); in cg_shift_path() 1066 if (p && p > cgroup) in cg_shift_path() 1069 *shifted = cgroup; in cg_shift_path() 1074 int cg_pid_get_path_shifted(pid_t pid, const char *root, char **cgroup) { in cg_pid_get_path_shifted() argument 1080 assert(cgroup); in cg_pid_get_path_shifted() 1091 *cgroup = TAKE_PTR(raw); in cg_pid_get_path_shifted() 1099 *cgroup = n; in cg_pid_get_path_shifted() 1105 int cg_path_decode_unit(const char *cgroup, char **unit) { in cg_path_decode_unit() argument [all …]
|
D | cgroup-util.h | 268 int cg_shift_path(const char *cgroup, const char *cached_root, const char **shifted); 269 int cg_pid_get_path_shifted(pid_t pid, const char *cached_root, char **cgroup); 279 int cg_path_decode_unit(const char *cgroup, char **unit);
|
/systemd-251/src/nspawn/ ! |
D | nspawn-cgroup.c | 81 _cleanup_free_ char *cgroup = NULL; in sync_cgroup() local 98 r = cg_pid_get_path(SYSTEMD_CGROUP_CONTROLLER, pid, &cgroup); in sync_cgroup() 120 fn = strjoina(tree, cgroup); in sync_cgroup() 123 fn = strjoina(tree, cgroup, "/cgroup.procs"); in sync_cgroup() 132 fn = strjoina(tree, cgroup); in sync_cgroup() 145 _cleanup_free_ char *cgroup = NULL; in create_subcgroup() local 172 r = cg_pid_get_path(SYSTEMD_CGROUP_CONTROLLER, 0, &cgroup); in create_subcgroup() 174 r = cg_pid_get_path(SYSTEMD_CGROUP_CONTROLLER, pid, &cgroup); in create_subcgroup() 178 payload = strjoina(cgroup, "/payload"); in create_subcgroup() 186 supervisor = strjoina(cgroup, "/supervisor"); in create_subcgroup() [all …]
|
D | meson.build | 6 'nspawn-cgroup.c', 7 'nspawn-cgroup.h',
|
/systemd-251/src/libsystemd/sd-bus/ ! |
D | bus-creds.c | 92 free(c->cgroup); in sd_bus_creds_unref() 369 assert(c->cgroup); in sd_bus_creds_get_cgroup() 370 *ret = c->cgroup; in sd_bus_creds_get_cgroup() 383 assert(c->cgroup); in sd_bus_creds_get_unit() 388 r = cg_shift_path(c->cgroup, c->cgroup_root, &shifted); in sd_bus_creds_get_unit() 410 assert(c->cgroup); in sd_bus_creds_get_user_unit() 415 r = cg_shift_path(c->cgroup, c->cgroup_root, &shifted); in sd_bus_creds_get_user_unit() 437 assert(c->cgroup); in sd_bus_creds_get_slice() 442 r = cg_shift_path(c->cgroup, c->cgroup_root, &shifted); in sd_bus_creds_get_slice() 464 assert(c->cgroup); in sd_bus_creds_get_user_slice() [all …]
|
/systemd-251/src/cgls/ ! |
D | cgls.c | 210 _cleanup_free_ char *cgroup = NULL, *unit_name = NULL; in run() local 225 q = show_cgroup_get_unit_path_and_warn(bus, unit_name, &cgroup); in run() 229 if (isempty(cgroup)) { in run() 234 printf("Unit %s (%s):\n", unit_name, cgroup); in run() 237 q = show_cgroup_by_path(cgroup, NULL, 0, arg_output_flags); in run()
|
/systemd-251/test/fuzz/fuzz-nspawn-oci/ ! |
D | crash-db0595479ee2e625fa5419a821009b5eb4d809b7 | 55 "destination": "/sys/fs/cgroup", 56 "type": "cgroup", 57 "source": "cgroup",
|
/systemd-251/src/journal/ ! |
D | journald-context.c | 160 c->cgroup = mfree(c->cgroup); in client_context_reset() 293 if (streq_ptr(c->cgroup, t)) in client_context_read_cgroup() 296 free_and_replace(c->cgroup, t); in client_context_read_cgroup() 298 (void) cg_path_get_session(c->cgroup, &t); in client_context_read_cgroup() 301 if (cg_path_get_owner_uid(c->cgroup, &c->owner_uid) < 0) in client_context_read_cgroup() 304 (void) cg_path_get_unit(c->cgroup, &t); in client_context_read_cgroup() 307 (void) cg_path_get_user_unit(c->cgroup, &t); in client_context_read_cgroup() 310 (void) cg_path_get_slice(c->cgroup, &t); in client_context_read_cgroup() 313 (void) cg_path_get_user_slice(c->cgroup, &t); in client_context_read_cgroup()
|
/systemd-251/src/shutdown/ ! |
D | shutdown.c | 335 _cleanup_free_ char *cgroup = NULL; in main() local 381 (void) cg_get_root_path(&cgroup); in main() 434 if (cgroup) in main() 435 (void) cg_trim(SYSTEMD_CGROUP_CONTROLLER, cgroup, false); in main()
|
/systemd-251/src/core/ ! |
D | meson.build | 20 cgroup.c 21 cgroup.h 26 dbus-cgroup.c 27 dbus-cgroup.h
|
/systemd-251/src/udev/ ! |
D | udevd.c | 93 char *cgroup; member 255 free(manager->cgroup); in manager_free() 1645 if (manager->cgroup) in on_post() 1647 …(void) cg_kill(SYSTEMD_CGROUP_CONTROLLER, manager->cgroup, SIGKILL, CGROUP_IGNORE_SELF, NULL, NULL… in on_post() 1878 _cleanup_free_ char *cgroup = NULL, *subcgroup = NULL; in create_subcgroup() local 1894 r = cg_pid_get_path(SYSTEMD_CGROUP_CONTROLLER, 0, &cgroup); in create_subcgroup() 1901 r = cg_get_xattr_bool(SYSTEMD_CGROUP_CONTROLLER, cgroup, "trusted.delegate"); in create_subcgroup() 1903 …turn log_debug_errno(SYNTHETIC_ERRNO(EOPNOTSUPP), "The cgroup %s is not delegated to us.", cgroup); in create_subcgroup() 1911 subcgroup = path_join(cgroup, "/udev"); in create_subcgroup() 1927 _cleanup_free_ char *cgroup = NULL; in manager_new() local [all …]
|
/systemd-251/src/systemd/ ! |
D | sd-login.h | 81 int sd_pid_get_cgroup(pid_t pid, char **cgroup); 113 int sd_peer_get_cgroup(int fd, char **cgroup);
|
/systemd-251/src/libsystemd/sd-login/ ! |
D | sd-login.c | 112 _public_ int sd_pid_get_cgroup(pid_t pid, char **cgroup) { in sd_pid_get_cgroup() argument 117 assert_return(cgroup, -EINVAL); in sd_pid_get_cgroup() 134 *cgroup = c; in sd_pid_get_cgroup() 236 _public_ int sd_peer_get_cgroup(int fd, char **cgroup) { in sd_peer_get_cgroup() argument 241 assert_return(cgroup, -EINVAL); in sd_peer_get_cgroup() 247 return sd_pid_get_cgroup(ucred.pid, cgroup); in sd_peer_get_cgroup()
|
D | test-login.c | 42 *display_session = NULL, *cgroup = NULL, in TEST() local 70 r = sd_pid_get_cgroup(0, &cgroup); in TEST() 71 log_info("sd_pid_get_cgroup(0, …) → %s / \"%s\"", e(r), strnull(cgroup)); in TEST()
|
/systemd-251/ ! |
D | README | 35 ≥ 4.5 for pids controller in cgroup v2 36 ≥ 4.6 for cgroup namespaces 38 ≥ 4.10 for cgroup-bpf egress and ingress hooks 39 ≥ 4.15 for cgroup-bpf device hook and cpu controller in cgroup v2 40 ≥ 4.17 for cgroup-bpf socket address hooks 382 Systemd will also warn when the cgroup support is unavailable in the 384 cgroup hierarchy (taint flag 'cgroupsv1'), the hardware clock is
|
/systemd-251/src/login/ ! |
D | loginctl.c | 286 _cleanup_free_ char *cgroup = NULL; in show_unit_cgroup() local 294 r = show_cgroup_get_unit_path_and_warn(bus, unit, &cgroup); in show_unit_cgroup() 298 if (isempty(cgroup)) in show_unit_cgroup() 307 r = unit_show_processes(bus, unit, cgroup, "\t\t ", c, get_output_flags(), &error); in show_unit_cgroup() 315 if (cg_is_empty_recursive(SYSTEMD_CGROUP_CONTROLLER, cgroup) != 0 && leader <= 0) in show_unit_cgroup() 318 …show_cgroup_and_extra(SYSTEMD_CGROUP_CONTROLLER, cgroup, "\t\t ", c, &leader, leader > 0, get_out… in show_unit_cgroup()
|