This crate provides a safe interface for reading and writing information to the kernel using the sysctl interface.
FreeBSD and macOS are supported.
Contributions for improvements and other platforms are welcome.
Documentation
Since the crate only builds on FreeBSD documentation is not available on https://docs.rs/sysctl
Available here
FreeBSD: https://johalun.github.io/sysctl-rs/freebsd/sysctl/index.html
macOS: https://johalun.github.io/sysctl-rs/macos/sysctl/index.html
or, to generate documentation locally do:
&&
Usage
Add to Cargo.toml
[]
= "0.1.3"
Example
sysctl comes with several examples, see the examples folder.
Run with:
Or in a separate crate:
extern crate sysctl;