9 releases
Uses new Rust 2021
0.1.10 | Nov 3, 2022 |
---|---|
0.1.9 |
|
0.1.8 | Apr 25, 2022 |
0.1.7 | Mar 19, 2022 |
0.1.3 | Jun 27, 2020 |
#125 in Unix APIs
51 downloads per month
67KB
1.5K
SLoC
M Prober Lib
This crate aims to quickly collect Linux system information including hostname, kernel version, uptime, RTC time, load average, CPU, memory, network interfaces, block devices and processes.
Examples
extern crate mprober_lib;
use mprober_lib::*;
println!("{}", hostname::get_hostname().unwrap());
println!("{}", kernel::get_kernel_version().unwrap());
println!("{}", btime::get_btime());
println!("{}", rtc_time::get_rtc_date_time().unwrap());
println!("{:#?}", uptime::get_uptime().unwrap());
println!("{:#?}", load_average::get_load_average().unwrap());
println!("{:#?}", cpu::get_cpus().unwrap());
println!("{:#?}", memory::free().unwrap());
println!("{:#?}", volume::get_volumes().unwrap());
println!("{:#?}", network::get_networks().unwrap());
println!("{:#?}", process::get_processes_with_stat(&process::ProcessFilter::default()).unwrap().into_iter().map(|(process, _)| process).collect::<Vec<process::Process>>());
Benchmark
cargo bench
Documentation
Official CLI
https://crates.io/crates/mprober
License
Dependencies
~2.6–3.5MB
~86K SLoC