5 releases

0.2.4 Jun 12, 2024
0.2.3 Oct 25, 2023
0.2.1 Sep 7, 2023
0.2.0 Nov 9, 2021
0.1.0 Nov 9, 2021

#141 in Operating systems

Download history 3191/week @ 2024-07-30 3731/week @ 2024-08-06 4580/week @ 2024-08-13 3352/week @ 2024-08-20 4020/week @ 2024-08-27 2130/week @ 2024-09-03 2146/week @ 2024-09-10 2197/week @ 2024-09-17 3775/week @ 2024-09-24 2595/week @ 2024-10-01 2833/week @ 2024-10-08 1901/week @ 2024-10-15 1126/week @ 2024-10-22 2027/week @ 2024-10-29 1943/week @ 2024-11-05 2359/week @ 2024-11-12

7,583 downloads per month

MIT/Apache

32KB
773 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

~230–720KB
~17K SLoC