Docs.rs
  • kstat-rs-0.2.4
    • kstat-rs 0.2.4
    • Permalink
    • Docs.rs crate page
    • MIT OR Apache-2.0
    • Links
    • Repository
    • crates.io
    • Source
    • Owners
    • bnaecker
    • Dependencies
      • libc ^0.2 normal
      • thiserror ^1 normal
      • subprocess ^0.2 dev
    • Versions
    • 38.27% of the crate is documented
  • Platform
    • i686-pc-windows-msvc
    • i686-unknown-linux-gnu
    • x86_64-apple-darwin
    • x86_64-pc-windows-msvc
    • x86_64-unknown-linux-gnu
  • Feature flags
  • Rust
    • About docs.rs
    • Privacy policy
    • Rust website
    • The Book
    • Standard Library API Reference
    • Rust by Example
    • The Cargo Guide
    • Clippy Documentation

Crate kstat_rs

kstat_rs0.2.4

  • All Items

Crate Items

  • Structs
  • Enums

Crates

  • kstat_rs

Crate kstat_rs

Source
Expand description

Rust library for interfacing with illumos kernel statistics, libkstat.

The illumos kstat system is a kernel module for exporting data about the system to user processes. Users create a control handle to the system with Ctl::new, which gives them access to the statistics exported by their system.

Individual statistics are represented by the Kstat type, which includes information about the type of data, when it was created or last updated, and the actual data itself. The Ctl handle maintains a linked list of Kstat objects, which users may walk with the Ctl::iter method.

Each kstat is identified by a module, an instance number, and a name. In addition, the data may be of several different types, such as name/value pairs or interrupt statistics. These types are captured by the Data enum, which can be read and returned by using the Ctl::read method.

Structs§

Ctl
Ctl is a handle to the kstat library.
Intr
Interrupt kernel statistic.
Io
An I/O kernel statistic
Iter
Kstat
Kstat represents a single kernel statistic.
Named
A name/value data element from a named kernel statistic.
Timer
A timer kernel statistic.

Enums§

Data
Data from a single kstat.
Error
Kinds of errors returned by the library.
NamedData
The value part of a name-value kernel statistic.
NamedType
The data type of a single name/value pair of a named kstat.
Type
The type of a kstat.

Results

Settings
Help
    enum
    kstat_rs::Data
    Data from a single kstat.
    method
    kstat_rs::Named::data_type
    Return the data type of a named kernel statistic.
    method
    kstat_rs::NamedData::data_type
    Return the data type of a named kernel statistic.
    enum variant
    kstat_rs::Error::NullData
    Encountered a null pointer or empty data.
    enum
    kstat_rs::NamedData
    The value part of a name-value kernel statistic.
    method
    kstat_rs::Data::clone
    &Data -> Data
    method
    kstat_rs::Data::fmt
    &Data, &mut Formatter -> Result
    method
    kstat_rs::Ctl::read
    &Ctl, &mut Kstat -> Result<Data, Error>
    Read a Kstat, returning the data for it.
    method
    kstat_rs::Data::clone
    &Data -> Data