mirror of
https://github.com/mii443/izoli.git
synced 2025-08-22 16:05:40 +00:00
add controller
This commit is contained in:
@ -5,4 +5,5 @@ fn main() {
|
||||
let cgroup = CGroup::new("test").unwrap();
|
||||
println!("{:?}", cgroup.get_root_path());
|
||||
println!("{}", cgroup.check_status());
|
||||
println!("{:?}", cgroup.read("cgroup.controllers"));
|
||||
}
|
||||
|
@ -4,6 +4,17 @@ use std::{
|
||||
path::{Path, PathBuf},
|
||||
};
|
||||
|
||||
pub enum Controller {
|
||||
Cpu,
|
||||
Cpuset,
|
||||
Memory,
|
||||
Io,
|
||||
Hugetlb,
|
||||
Misc,
|
||||
Pids,
|
||||
Rdma,
|
||||
}
|
||||
|
||||
pub struct CGroup {
|
||||
pub path: PathBuf,
|
||||
}
|
||||
|
Reference in New Issue
Block a user