#linux #probe #proc

mprober-lib

A library aims to quickly collect Linux system information including hostname, kernel version, uptime, RTC time, load average, CPU, memory, network interfaces, block devices and processes

6 releases

0.1.6 Apr 21, 2021
0.1.5 Apr 21, 2021
0.1.4 Jul 29, 2020
0.1.3 Jun 27, 2020

#87 in Unix APIs

Download history 28/week @ 2021-08-10 3/week @ 2021-08-17 7/week @ 2021-08-24 1/week @ 2021-08-31 4/week @ 2021-09-07 27/week @ 2021-09-14 13/week @ 2021-09-21 18/week @ 2021-09-28 19/week @ 2021-10-05 21/week @ 2021-10-12 12/week @ 2021-10-19 32/week @ 2021-10-26 23/week @ 2021-11-02 9/week @ 2021-11-09 6/week @ 2021-11-16 8/week @ 2021-11-23

52 downloads per month

MIT license

67KB
1.5K SLoC

M Prober Lib

CI

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

https://docs.rs/mprober-lib

Official CLI

https://crates.io/crates/mprober

License

MIT

Dependencies

~4MB
~95K SLoC