This repository experiments with Daniel Mack's eBPF hooks for cgroups.
- Linux >= v4.10-rc
CONFIG_CGROUP_BPF=y
- cgroup2 hierarchy mounted (
mount -t cgroup2 none <mount point>
)
Example:
#### cd into cgroup v2 hierarchy
cd /sys/fs/cgroup/unified
#### create new cgroup
mkdir demo
#### add a process
echo 1234 >>demo/cgroup.procs
sudo ./cgroup-ebpf out/ebpf.o /sys/fs/cgroup/unified/demo/
We use gvt.