#pragma once ///@file #if __linux__ #include #include #include "types.hh" namespace nix { std::optional getCgroupFS(); std::map getCgroups(const Path & cgroupFile); struct CgroupStats { std::optional cpuUser, cpuSystem; }; /** * Destroy the cgroup denoted by 'path'. The postcondition is that * 'path' does not exist, and thus any processes in the cgroup have * been killed. Also return statistics from the cgroup just before * destruction. */ CgroupStats destroyCgroup(const Path & cgroup); } #endif