Registry / utility / sysctl

sysctl

JSON →
library0.7.1rscratesunverified

Simplified interface to libc::sysctl

# Cargo.toml [dependencies] sysctl = "0.7.1"
INSTALL
IMPORT
SIG · SYSCTL
S
sysctl
utilityrustv0.7.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Sysctl
use sysctl::Sysctl;

Read a sysctl MIB value by name.

use sysctl::Sysctl; fn main() { let sys = sysctl::Sysctl::new("kern.hostname").unwrap(); println!("{:?}", sys.value_string()); }
Debug
Known issues
gotchaOnly works on Unix-like systems with sysctl support (e.g., macOS, FreeBSD).
fix
Use conditional compilation or fallback for other platforms.
affects: >=0.1.0
Upgrade
Version history
0.7.1latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
38 hits · last 30 days
node
36
Bingbot
1
Resources
sysctl — cargo add sysctl · libregistry