Struct cgroups::pid::PidController
source · pub struct PidController { /* private fields */ }
Expand description
A controller that allows controlling the pids
subsystem of a Cgroup.
Implementations
sourceimpl PidController
impl PidController
sourcepub fn new(oroot: PathBuf) -> Self
pub fn new(oroot: PathBuf) -> Self
Constructors a new PidController
instance, with oroot
serving as the controller’s root
directory.
sourcepub fn get_pid_events(&self) -> Result<u64>
pub fn get_pid_events(&self) -> Result<u64>
The number of times fork
failed because the limit was hit.
sourcepub fn get_pid_current(&self) -> Result<u64>
pub fn get_pid_current(&self) -> Result<u64>
The number of processes currently.
sourcepub fn get_pid_max(&self) -> Result<PidMax>
pub fn get_pid_max(&self) -> Result<PidMax>
The maximum number of processes that can exist at one time in the control group.
sourcepub fn set_pid_max(&self, max_pid: PidMax) -> Result<()>
pub fn set_pid_max(&self, max_pid: PidMax) -> Result<()>
Set the maximum number of processes that can exist in this control group.
Note that if get_pid_current()
returns a higher number than what you
are about to set (max_pid
), then no processess will be killed. Additonally, attaching
extra processes to a control group disregards the limit.
Trait Implementations
sourceimpl Clone for PidController
impl Clone for PidController
sourcefn clone(&self) -> PidController
fn clone(&self) -> PidController
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for PidController
impl Debug for PidController
sourceimpl<'a> From<&'a Subsystem> for &'a PidController
impl<'a> From<&'a Subsystem> for &'a PidController
sourcefn from(sub: &'a Subsystem) -> &'a PidController
fn from(sub: &'a Subsystem) -> &'a PidController
Converts to this type from the input type.
Auto Trait Implementations
impl RefUnwindSafe for PidController
impl Send for PidController
impl Sync for PidController
impl Unpin for PidController
impl UnwindSafe for PidController
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more