https://github.com/taoky/cgumi
cgumi is yet another crate for interacting with cgroupv2
https://github.com/taoky/cgumi
cgroups-v2
Last synced: 10 months ago
JSON representation
cgumi is yet another crate for interacting with cgroupv2
- Host: GitHub
- URL: https://github.com/taoky/cgumi
- Owner: taoky
- License: mit
- Created: 2023-05-24T11:30:20.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2023-05-28T16:36:30.000Z (about 3 years ago)
- Last Synced: 2025-03-31T09:47:10.345Z (about 1 year ago)
- Topics: cgroups-v2
- Language: Rust
- Homepage:
- Size: 31.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
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
- [x] Create node
- [x] Move process to node
- [x] Delegate node (chown)
- [x] Get memory & io usage
- [x] Sudo + sh support
- [x] Systemd support
## Running tests
Some tests run only in root, and some others run only in non-root env.
```sh
# 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.
```sh
RUST_LOG=debug cargo test -- --nocapture
```