kstat 0.1.0

Crate providing an ffi wrapper around the native illumos kstat library.
Documentation

kstat

Docs

This rust library provides an ffi wrapper around the native illumos library.

Example

The following is equivalent to kstat -p -n zone_vfs:

extern crate kstat;

use kstat::KstatReader;

fn main() {
    let reader = KstatReader::new(None, None, None, Some("zone_vfs"))
        .expect("failed to create kstat reader");
    let stats = reader.read().expect("failed to read kstats");
    println!("{:#?}", stats);
}