#cgroup #explorer #linux #metrics #container

bin+lib cgroups-explorer

A crate to explore cgroups and gather metrics

2 unstable releases

new 0.2.0 Mar 3, 2025
0.1.0 Feb 25, 2025

#465 in Unix APIs

Download history 82/week @ 2025-02-19 188/week @ 2025-02-26

270 downloads per month

MIT license

12KB
219 lines

cgroups-explorer

Crates.io Version Tests

A crate for exploring control groups v1 and v2 on Linux.

Uses the cgroups-rs crate to interact with cgroups.

Usage

use cgroups_explorer::Explorer;

let explorer = Explorer::detect_version()
    .include(vec!["user.slice/*".to_string()])
    .build()
    .expect("Failed to build explorer");
let found = explorer
    .iter_cgroups()
    .for_each(|c| println!("Found cgroup: {}", c.path()));

lib.rs:

cgroups-explorer

Dependencies

~5–13MB
~156K SLoC