cgroup v2 unRAID
This is a (very) simple C program designed to clean up cgroups v2 on unRAID. It operates in two modes:
Daemon mode:
In this mode, the program runs as a daemon and monitors the files at /sys/fs/cgroup/<PID>/cgroup.events
. It watches for any changes in the populated
status. If the status changes from 1
to 0
, the corresponding directory is removed.
Usage: cgroup2-unraid --daemon
Non-Daemon mode:
If called without the --daemon
option, the program scans all /sys/fs/cgroup/<PID>/cgroup.events
files. It identifies any directories where populated
is 0
and removes those directories.
Usage: cgroup2-unraid
Compilation steps:
gc -o cgroup2-unraid cgroup2-unraid.c
Description
Languages
C
68.5%
Shell
31.5%