4 releases

0.2.3 Oct 25, 2023
0.2.1 Sep 7, 2023
0.2.0 Nov 9, 2021
0.1.0 Nov 9, 2021

#146 in Operating systems

Download history 1340/week @ 2024-01-03 1279/week @ 2024-01-10 1793/week @ 2024-01-17 1857/week @ 2024-01-24 2173/week @ 2024-01-31 972/week @ 2024-02-07 1862/week @ 2024-02-14 1207/week @ 2024-02-21 1666/week @ 2024-02-28 1971/week @ 2024-03-06 2135/week @ 2024-03-13 1636/week @ 2024-03-20 1759/week @ 2024-03-27 2639/week @ 2024-04-03 1974/week @ 2024-04-10 1402/week @ 2024-04-17

8,206 downloads per month

Apache-2.0

31KB
723 lines

kstat-rs

Rust interfaces to illumos's libkstat.


lib.rs:

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.

Dependencies

~0.3–0.8MB
~20K SLoC