Crate kstat[−][src]
kstat
A simple rust crate that allows you to read kernel statistics via the kstat framework on
illumos. The kstat
crate exposes a KstatReader
type that tracks kstats that are of
interest to the consumer, allowing them to call the read
method on the type to read in all of
the named-value pairs associated with those particular kstats. This means that the crate only
allows the consumer to track/read kstats that are of type KSTAT_TYPE_NAMED or KSTAT_TYPE_IO.
Example:
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); }
Modules
kstat_named |
The type of data found in named-value pairs of a kstat |
Structs
KstatData |
The corresponding data read in from a kstat |
KstatReader |
|