Nix
2.36.0
Nix, the purely functional package manager; unstable internal interfaces
Toggle main menu visibility
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
"
9
#include "
nix/util/canon-path.hh
"
10
11
namespace
nix::linux {
12
13
std::optional<std::filesystem::path> getCgroupFS();
14
15
StringMap
getCgroups(
const
std::filesystem::path & cgroupFile);
16
17
struct
CgroupStats
18
{
19
std::optional<std::chrono::microseconds> cpuUser, cpuSystem;
20
};
21
25
CgroupStats
getCgroupStats(
const
std::filesystem::path & cgroup);
26
33
CgroupStats
destroyCgroup(
const
std::filesystem::path & cgroup);
34
35
CanonPath
getCurrentCgroup();
36
42
CanonPath
getRootCgroup();
43
49
void
setRootCgroup(
CanonPath
cgroup);
50
51
}
// namespace nix::linux
canon-path.hh
nix::CanonPath
Definition
canon-path.hh:50
nix::linux::CgroupStats
Definition
cgroup.hh:18
types.hh
nix::StringMap
std::map< std::string, std::string, std::less<> > StringMap
Definition
types.hh:26
libutil
linux
include
nix
util
cgroup.hh
Generated by
1.18.0