rctl 0.4.1

FreeBSD resource limits and accounting with RCTL / RACCT
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
extern crate libc;
extern crate rctl;

fn main() {
    println!("RCTL is {}", rctl::State::check());

    let uid = unsafe { libc::getuid() };

    let subject = rctl::Subject::user_id(uid);

    let usage = subject.usage().expect("Could not get RCTL usage");

    println!("{usage:#?}");
}