Show IO pressure and per-device stats
PSI IO stalls plus rbytes/wbytes/rios per major:minor. Helps find noisy disk neighbors
cat /sys/fs/cgroup/system.slice/<name>.service/io.pressure /sys/fs/cgroup/system.slice/<name>.service/io.stat
- tool
- cgroups8 commands
More cgroups commands
-
cat /sys/fs/cgroup/system.slice/<name>.service/cgroup.procs; systemctl status <name>.service | grep CGroupAll PIDs that are in the service cgroup right now. Compare them with the tree from systemctl status
-
systemd-cgls --all --no-pager; systemd-cgtop -d 2 --depth=3cgls --all also shows empty cgroups. cgtop ranks slices by live CPU, memory and IO
-
cgcreate -g memory:/<name>; cgset -r memory.limit_in_bytes=512M <name>; cgexec -g memory:/<name> <command>A throwaway memory limit with libcgroup v1. Note: on the unified v2 hierarchy, use systemd-run --scope -p
-
cat /sys/fs/cgroup/system.slice/<name>.service/memory.current /sys/fs/cgroup/system.slice/<name>.service/memory.maxCurrent memory usage of a systemd service (page cache included) and its hard limit. If current is close to max, OOM is near
-
cat /sys/fs/cgroup/system.slice/<name>.service/memory.pressurePSI shows how long tasks wait for memory reclaim. A growing avg10 means thrashing before OOM