#include <devices.hpp>
|
| DevicesCGroup (const std::string &name) |
|
void | allow (DevicePermission p) |
|
void | deny (DevicePermission p) |
|
void | allow (char type, int major, int minor, const std::string &perm) |
|
void | deny (char type, int major, int minor, const std::string &perm) |
|
std::vector< DevicePermission > | list () |
|
bool | exists () const |
| Check if cgroup exists. More...
|
|
void | create () |
| Create cgroup directory. More...
|
|
void | destroy () |
| Destroy cgroup directory Equivalent of: rmdir subsys.path / mName Note: set memory.force_empty before removing a cgroup to avoid moving out-of-use page caches to parent. More...
|
|
void | setCommonValue (const std::string ¶m, const std::string &value) |
| Set common 'cgroup' parameter. More...
|
|
std::string | getCommonValue (const std::string ¶m) const |
| Get common 'cgroup' paramter. More...
|
|
void | setValue (const std::string ¶m, const std::string &value) |
| Set cgroup parameter to value (name validity depends on subsystem). More...
|
|
std::string | getValue (const std::string ¶m) const |
| Get cgroup parameter. More...
|
|
void | assignGroup (pid_t pid) |
| Assign all processes in threadgroup of pid to this cgroup. More...
|
|
void | assignPid (pid_t pid) |
| Assign single process to this cgroup (will be removed from previous cgroup automatically). More...
|
|
std::vector< pid_t > | getPids () const |
| Get list of pid assigned to this group. More...
|
|
|
static CGroup | getCGroup (const std::string &subsys, pid_t pid) |
| Get cgroup of process pid in given subsystem. More...
|
|
lxcpp::DevicesCGroup::DevicesCGroup |
( |
const std::string & |
name | ) |
|
|
inline |
void lxcpp::DevicesCGroup::allow |
( |
char |
type, |
|
|
int |
major, |
|
|
int |
minor, |
|
|
const std::string & |
perm |
|
) |
| |
void lxcpp::CGroup::assignGroup |
( |
pid_t |
pid | ) |
|
|
inherited |
Assign all processes in threadgroup of pid to this cgroup.
Equivalent of: echo pid > mSubsys_path/mName/cgroup.procs
void lxcpp::CGroup::assignPid |
( |
pid_t |
pid | ) |
|
|
inherited |
Assign single process to this cgroup (will be removed from previous cgroup automatically).
Equivalent of: echo pid > mSubsys_path/mName/tasks
void lxcpp::CGroup::create |
( |
| ) |
|
|
inherited |
Create cgroup directory.
Equivalent of: mkdir subsys.path / mName
void lxcpp::DevicesCGroup::deny |
( |
char |
type, |
|
|
int |
major, |
|
|
int |
minor, |
|
|
const std::string & |
perm |
|
) |
| |
void lxcpp::CGroup::destroy |
( |
| ) |
|
|
inherited |
Destroy cgroup directory Equivalent of: rmdir subsys.path / mName Note: set memory.force_empty before removing a cgroup to avoid moving out-of-use page caches to parent.
bool lxcpp::CGroup::exists |
( |
| ) |
const |
|
inherited |
Check if cgroup exists.
- Returns
- true if cgroup path (subsys.path / mName) exists
CGroup lxcpp::CGroup::getCGroup |
( |
const std::string & |
subsys, |
|
|
pid_t |
pid |
|
) |
| |
|
staticinherited |
Get cgroup of process pid in given subsystem.
std::string lxcpp::CGroup::getCommonValue |
( |
const std::string & |
param | ) |
const |
|
inherited |
Get common 'cgroup' paramter.
Equivalent of: cat mSubsys_path/mName/cgroup.param
std::vector< pid_t > lxcpp::CGroup::getPids |
( |
| ) |
const |
|
inherited |
Get list of pid assigned to this group.
Equivalent of: cat mSubsys_path/mName/tasks
std::string lxcpp::CGroup::getValue |
( |
const std::string & |
param | ) |
const |
|
inherited |
Get cgroup parameter.
Equivalent of: cat mSubsys_path/mName/mSubsys_name.param
void lxcpp::CGroup::setCommonValue |
( |
const std::string & |
param, |
|
|
const std::string & |
value |
|
) |
| |
|
inherited |
Set common 'cgroup' parameter.
Equivalent of: echo value > mSubsys_path/mName/cgroup.param
void lxcpp::CGroup::setValue |
( |
const std::string & |
param, |
|
|
const std::string & |
value |
|
) |
| |
|
inherited |
Set cgroup parameter to value (name validity depends on subsystem).
Equivalent of: echo value > mSubsys_path/mName/mSubsys_name.param
The documentation for this class was generated from the following files: