Skip to main content

Module cgroups

Module cgroups 

Source
Available on Android or Linux only.
Expand description

Currently not covered

  • cgroup v2 in non-standard mountpoints
  • paths containing control characters or spaces, since those would be escaped in procfs output and we don’t unescape

Re-exportsΒ§

use crate::borrow::Cow; πŸ”’
use crate::ffi::OsString; πŸ”’
use crate::fs::File; πŸ”’
use crate::fs::exists; πŸ”’
use crate::io::BufRead; πŸ”’
use crate::io::Read; πŸ”’
use crate::os::unix::ffi::OsStringExt; πŸ”’
use crate::path::Path; πŸ”’
use crate::path::PathBuf; πŸ”’
use crate::str::from_utf8; πŸ”’

EnumsΒ§

Cgroup πŸ”’

FunctionsΒ§

find_mountpoint πŸ”’
Scan mountinfo for cgroup v1 mountpoint with a cpu controller
quota πŸ”’
Returns cgroup CPU quota in core-equivalents, rounded down or usize::MAX if the quota cannot be determined or is not set.
quota_v1 πŸ”’
quota_v2 πŸ”’