![]() |
MySQL 9.3.0
Source Code Documentation
|
Functions | |
template<typename... Args> | |
bool | read_line_from_file (const std::string_view &path, Args &...args) |
Utility: Read the first line from the file specified in path and copy its contents into the arguments passed. More... | |
std::optional< uint32_t > | cgroup_v1_cpu () |
Read CPU limits as if it were set by cgroup v1. More... | |
std::optional< uint64_t > | cgroup_v1_memory () |
Read memory limits as if it were set by cgroup v1. More... | |
std::optional< uint32_t > | cgroup_v2_cpu () |
Read CPU limits as if it were set by cgroup v2. More... | |
std::optional< uint64_t > | cgroup_v2_memory () |
Read Memory limits as if it were set by cgroup v2. More... | |
Variables | |
constexpr std::string_view | quota_path {"/sys/fs/cgroup/cpu/cpu.cfs_quota_us"} |
cgroup v1 path to file containing CPU quota More... | |
constexpr std::string_view | period_path {"/sys/fs/cgroup/cpu/cpu.cfs_period_us"} |
cgroup v1 path to file containing CPU period More... | |
constexpr std::string_view | mem_path_v1 |
cgroup v1 path to file containing Memory limits More... | |
constexpr std::string_view | cpu_path_v2 {"/sys/fs/cgroup/cpu.max"} |
cgroup v2 path to file containing CPU limts More... | |
constexpr std::string_view | mem_path_v2 {"/sys/fs/cgroup/memory.max"} |
cgroup v2 path to file containing Memory limits More... | |
std::optional< uint32_t > anonymous_namespace{my_system_api_cgroup.cc}::cgroup_v1_cpu | ( | ) |
Read CPU limits as if it were set by cgroup v1.
std::optional< uint64_t > anonymous_namespace{my_system_api_cgroup.cc}::cgroup_v1_memory | ( | ) |
Read memory limits as if it were set by cgroup v1.
std::optional< uint32_t > anonymous_namespace{my_system_api_cgroup.cc}::cgroup_v2_cpu | ( | ) |
Read CPU limits as if it were set by cgroup v2.
std::optional< uint64_t > anonymous_namespace{my_system_api_cgroup.cc}::cgroup_v2_memory | ( | ) |
Read Memory limits as if it were set by cgroup v2.
bool anonymous_namespace{my_system_api_cgroup.cc}::read_line_from_file | ( | const std::string_view & | path, |
Args &... | args | ||
) |
Utility: Read the first line from the file specified in path and copy its contents into the arguments passed.
[in] | path | Path to file |
[out] | args | Pass the arguments that you expect to read from the file in the order of their appearance in the file |
|
constexpr |
cgroup v2 path to file containing CPU limts
|
constexpr |
cgroup v1 path to file containing Memory limits
|
constexpr |
cgroup v2 path to file containing Memory limits
|
constexpr |
cgroup v1 path to file containing CPU period
|
constexpr |
cgroup v1 path to file containing CPU quota