cgumi

Crates.iocgumi
lib.rscgumi
version0.0.2
sourcesrc
created_at2023-05-25 13:47:23.782974
updated_at2023-05-25 19:45:46.050523
descriptioncgumi is yet another crate for interacting with cgroupv2
homepagehttps://github.com/taoky/cgumi
repositoryhttps://github.com/taoky/cgumi
max_upload_size
id874311
size125,166
taoky (taoky)

documentation

README

cgumi

https://crates.io/crates/cgumi

cgumi is yet another crate for interacting with cgroupv2 (WIP). It focuses on serving apps for creating their own cgroupv2 hierarchies, instead of managing all cgroup nodes on one system.

There is no plan for legacy cgroupv1 support.

Notes

Breaking changes may happen! And suggestions are very welcomed as current API design may be suboptimized.

systemd feature is enabled by default. To disable systemd feature (and thus avoiding installing zbus):

[dependencies]
cgumi = { version = "*", default-features = false }

Planned features

  • Create node
  • Move process to node
  • Delegate node (chown)
  • Get memory & io usage
  • Sudo + sh support
  • Systemd support

Running tests

Some tests run only in root, and some others run only in non-root env.

# both are necessary to run all tests
cargo test
CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUNNER='sudo -E' cargo test

And also, you can run tests with --nocapture to see more details. RUST_LOG is also available.

RUST_LOG=debug cargo test -- --nocapture
Commit count: 12

cargo fmt