kstat 0.1.0

Crate providing an ffi wrapper around the native illumos kstat library.
Documentation
  • Coverage
  • 100%
    20 out of 20 items documented3 out of 6 items with examples
  • Size
  • Source code size: 21.45 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 2.16 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 12s Average build duration of successful builds.
  • all releases: 12s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • papertigers/rust-kstat
    4 2 4
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • papertigers

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);
}