Quickly verify that the kernel exposes a unified cgroup v2 mount, find available controllers and map processes into the hierarchy. 30.12.2025 | reading time: 3 min Want to know if your system runs the unified cgroup v2 layout and which controllers are active? This short guide shows concrete commands to detect a cgroup v2 mount, read available controllers and map a process into the hierarchy so he can act immediately. Quick live check Run a few quick commands to confirm support and a mount; here is a compact demonstration you can paste and run: ```bash $ grep -i cgroup2 /proc/filesystems ; nodev cgroup2 ; $ findmnt -t cgroup2 ; TARGET /sys/fs/cgroup none cgroup2 rw,nosuid,nodev,noexec,relatime ; $ cat /sys/fs/cgroup/cgroup.controllers ; cpu io memory pids ; $ cat /proc/$$/cgroup ; 0::/user.slice/user-1000.slice/session-2.scope ``` These commands show kernel support, the active mount, available controllers and the cgroup path for the current shell. Map a process to its cgroup Find the cgroup path for a process and inspect its directory with a single-line sequence; run this on a shell: ```bash cgpath=$(sed -n 's/^0:://p' /proc/$$/cgroup); echo "$cgpath"; ls -l "/sys/fs/cgroup${cgpath}" || echo "no such cgroup path" ``` The output reveals the cgroup directory and files such as `cgroup.controllers`, `cgroup.events` and any enabled resource files like `memory.max` or `cpu.max` for that slice or scope. What to inspect next Look at `cgroup.controllers` to see available controllers and `cgroup.subtree_control` to see which controllers are propagated to child cgroups; then check `cgroup.procs` or `cgroup.threads` for members and controller-specific files such as `memory.max`, `cpu.max` or `pids.max` to understand enforced limits; when a controller's files are absent, it is not enabled in that subtree, so enable it at the parent to make it usable for children. Practical troubleshooting tips If you see legacy v1 controllers in `/proc/cgroups` but no cgroup2 mount, systemd or the kernel boot options may choose v1; try enabling a cgroup2 mount with your init or kernel parameters for testing, or inspect `dmesg` for cgroup-related boot messages; also remember some containers and minimal kernels export only a partial hierarchy, so verify inside the target namespace too. Next tools to reach for Beyond basic file inspection, use `systemd-cgls` to visualize the tree on systemd systems, `findmnt` to confirm mounts reliably, and `ps` or `top` to correlate PIDs with cgroup membership when diagnosing live workloads. Wrap-up and next steps You have concrete commands to detect a cgroup v2 mount, list controllers and map processes into the unified hierarchy; keep practicing these checks on different hosts and containers to build intuition and prepare for deeper topics like resource tuning and namespace interactions; consider structured study and an exam track such as CompTIA Linux+ or LPIC-1 and intensive preparation at bitsandbytes.academy to turn hands-on skill into certification. Join Bits & Bytes Academy First class LINUX exam preparation. processes infrastructure utilities troubleshooting