Struct cgroups_rs::memory::MemController[][src]

pub struct MemController { /* fields omitted */ }
Expand description

A controller that allows controlling the memory subsystem of a Cgroup.

In essence, using the memory controller, the user can gather statistics about the memory usage of the tasks in the control group. Additonally, one can also set powerful limits on their memory usage.

Implementations

Contructs a new MemController with root serving as the root of the control group.

Gathers overall statistics (and the current state of) about the memory usage of the control group’s tasks.

See the individual fields for more explanation, and as always, remember to consult the kernel Documentation and/or sources.

Gathers information about the kernel memory usage of the control group’s tasks.

Gathers information about the control group’s kernel memory usage where said memory is TCP-related.

Gathers information about the memory usage of the control group including the swap usage (if any).

Reset the fail counter

Reset the kernel memory fail counter

Reset the TCP related fail counter

Reset the memory+swap fail counter

Reset the max memory usage recorded

Set the memory usage limit of the control group, in bytes.

Set the kernel memory limit of the control group, in bytes.

Set the memory+swap limit of the control group, in bytes.

Set how much kernel memory can be used for TCP-related buffers by the control group.

Set the soft limit of the control group, in bytes.

This limit is enforced when the system is nearing OOM conditions. Contrast this with the hard limit, which is always enforced.

Set how likely the kernel is to swap out parts of the address space used by the control group.

Note that a value of zero does not imply that the process will not be swapped out.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Apply a set of resources to the Controller, invoking its internal functions to pass the kernel the information.

Create this controller

Set notify_on_release

Set release_agent

Does this controller already exist?

Delete the controller.

Attach a task to this controller.

Attach a task to this controller by thread group id.

Get the list of tasks that this controller has.

The file system path to the controller.

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.