← All Modules

cgroup

cgroup v2 unified-hierarchy readers. Linux-only — the table is empty on other platforms. Plan 18 / v0.15.1.

Pure std::fs reads with path canonicalisation; every input path is required to start with /sys/fs/cgroup/ after symlink resolution. Cgroup v2's "max" sentinel maps to Lua nil so callers can write if not mem.max then ... instead of comparing strings.

Typical usage: walk every container slice under /sys/fs/cgroup/machine.slice, read cpu_stat and memory once per refresh cycle, render a dashboard.