[systemd-devel] how to nest slices under system.slice

Umut Tezduyar Lindskog umut at tezduyar.com
Thu Mar 5 04:55:18 PST 2015


Hi,

How do I add a slice that is inside the system.slice?

Following slice gets nested to -.slice where I want to nest it inside
system.slice (just like instantaneous service slices).

hello.slice
[Unit]
Description=hello slice

I tried following which produced the correct output with "systemctl
show -p Slice hello.slice" but the slice was still in the top level
hierarchy.

[Unit]
Description=hello slice
[Slice]
Slice=system.slice

# ls -al /sys/fs/cgroup/systemd/
drwxr-xr-x    4 root     root             0 Mar 14 05:35 hello.slice
drwxr-xr-x   89 root     root             0 Mar 14 05:35 system.slice
...
...
-rw-r--r--    1 root     root             0 Mar 14 05:47 tasks
-rw-r--r--    1 root     root             0 Mar 14 05:35 release_agent

Umut


More information about the systemd-devel mailing list