Nix 2.36.0
Nix, the purely functional package manager; unstable internal interfaces
Loading...
Searching...
No Matches
cgroup.hh
Go to the documentation of this file.
1#pragma once
3
4#include <chrono>
5#include <optional>
6#include <filesystem>
7
8#include "nix/util/types.hh"
10
11namespace nix::linux {
12
13std::optional<std::filesystem::path> getCgroupFS();
14
15StringMap getCgroups(const std::filesystem::path & cgroupFile);
16
18{
19 std::optional<std::chrono::microseconds> cpuUser, cpuSystem;
20};
21
25CgroupStats getCgroupStats(const std::filesystem::path & cgroup);
26
33CgroupStats destroyCgroup(const std::filesystem::path & cgroup);
34
35CanonPath getCurrentCgroup();
36
42CanonPath getRootCgroup();
43
49void setRootCgroup(CanonPath cgroup);
50
51} // namespace nix::linux
Definition canon-path.hh:50
Definition cgroup.hh:18
std::map< std::string, std::string, std::less<> > StringMap
Definition types.hh:26