Module cgroups

cgroups Manipulation Functions

.

Copyright © 2016-2018 Michael Truog

Version: 1.7.3 Feb 26 2018 16:29:10 ------------------------------------------------------------------------

Authors: Michael Truog (mjtruog [at] gmail (dot) com).

Description

cgroups Manipulation Functions

Data Types

options()

options() = [{version_default, pos_integer()} | {version_default_required, boolean()} | {path_v1, string()} | {path_v2, string()} | {path_mounts, string() | undefined}]

Function Index

create/4

Create a specific cgroup.

Files cpuset.cpus and cpuset.mems are set if they are not initialized due to cgroup.clone_children (using the root values).
delete/2

Delete a specific cgroup.

The cgroup must not contain any OS processes for this function to succeed.
delete_recursive/2

Delete a specific cgroup and as many non-leaf cgroups as possible.

The cgroup must not contain any OS processes for this function to succeed.
destroy/1

Destroy cgroups state data.

.
new/0

Create new cgroups state data.

.
new/1

Create new cgroups state data with local options.

.
shell/2

Execute a command with the default shell.

.
update/4

Update a cgroup path.

May be used on the cgroup root path.
update_or_create/4

Update or create a specific cgroup.

.

Function Details

create/4

create(CGroupPath::nonempty_string(), OSPids::[pos_integer()], CGroupParameters::[{string(), string()}], State::#cgroups{version = pos_integer(), path = string(), mounted = boolean()}) -> ok | {error, any()}

Create a specific cgroup.

Files cpuset.cpus and cpuset.mems are set if they are not initialized due to cgroup.clone_children (using the root values).

delete/2

delete(CGroupPath::nonempty_string(), State::#cgroups{version = pos_integer(), path = string(), mounted = boolean()}) -> ok | {error, any()}

Delete a specific cgroup.

The cgroup must not contain any OS processes for this function to succeed.

delete_recursive/2

delete_recursive(CGroupPath::nonempty_string(), State::#cgroups{version = pos_integer(), path = string(), mounted = boolean()}) -> ok | {error, any()}

Delete a specific cgroup and as many non-leaf cgroups as possible.

The cgroup must not contain any OS processes for this function to succeed.

destroy/1

destroy(Cgroups::#cgroups{version = pos_integer(), path = string(), mounted = boolean()}) -> ok

Destroy cgroups state data.

new/0

new() -> {ok, #cgroups{version = pos_integer(), path = string(), mounted = boolean()}} | {error, any()}

Create new cgroups state data.

new/1

new(Options0::options()) -> {ok, #cgroups{version = pos_integer(), path = string(), mounted = boolean()}} | {error, any()}

Create new cgroups state data with local options.

shell/2

shell(Command::string(), Arguments::list()) -> {non_neg_integer(), [binary()]}

Execute a command with the default shell.

update/4

update(CGroupPath::string(), OSPids::[pos_integer()], CGroupParameters::[{string(), string()}], State::#cgroups{version = pos_integer(), path = string(), mounted = boolean()}) -> ok | {error, any()}

Update a cgroup path.

May be used on the cgroup root path.

update_or_create/4

update_or_create(CGroupPath::nonempty_string(), OSPids::[pos_integer()], CGroupParameters::[{string(), string()}], State::#cgroups{version = pos_integer(), path = string(), mounted = boolean()}) -> ok | {error, any()}

Update or create a specific cgroup.


Generated by EDoc, Feb 26 2018, 16:29:10.