The following is a simple example on how to adapt any longrun source directory to assign the process to a cgroup-v2.
First of all make sure the mount-cgroups-v2 service is started, it is part of goetia-linux.
Assume we start with the following
run script:
#!/bin/execlineb -P
fdmove -c 2 1
foo
-b
-a
-r
Add a background block in front,
so the entire final run script
looks as follows.
Replace GROUP
with the subpath to the desired cgroup.
#!/bin/execlineb -P
fdmove -c 2 1
foreground {
redirfd -a 1 /sys/fs/cgroup/GROUP/cgroup.procs
s6-svstat -p
}
foo
-b
-a
-r