Skip to main content

unit_from_cgroup

Function unit_from_cgroup 

Source
pub fn unit_from_cgroup(cgroup: &str) -> Option<String>
Expand description

Resolve the owning systemd unit name from /proc/self/cgroup contents.

Handles cgroup v2 (0::/system.slice/foo.service) and v1 (1:name=systemd:/system.slice/foo.service) layouts; the deepest .service / .scope path component wins.