Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/magiclen/m-prober-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.
https://github.com/magiclen/m-prober-lib
linux mprober rust
Last synced: 28 days ago
JSON representation
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.
- Host: GitHub
- URL: https://github.com/magiclen/m-prober-lib
- Owner: magiclen
- License: mit
- Created: 2020-06-01T19:51:17.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-11-14T02:26:25.000Z (about 1 year ago)
- Last Synced: 2024-10-29T23:10:11.448Z (about 2 months ago)
- Topics: linux, mprober, rust
- Language: Rust
- Homepage:
- Size: 70.3 KB
- Stars: 6
- Watchers: 4
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
M Prober Lib
====================[![CI](https://github.com/magiclen/m-prober-lib/actions/workflows/ci.yml/badge.svg)](https://github.com/magiclen/m-prober-lib/actions/workflows/ci.yml)
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
```rust
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::>());
```## Benchmark
```bash
cargo bench
```## Documentation
https://docs.rs/mprober-lib
## Official CLI
https://crates.io/crates/mprober
## License
[MIT](LICENSE)