Crates.io | simple_server_status |
lib.rs | simple_server_status |
version | 0.2.4 |
source | src |
created_at | 2022-05-29 06:17:49.267403 |
updated_at | 2024-08-08 20:27:48.649069 |
description | Simple cpu, ram, net, and tcp status for Linux servers |
homepage | |
repository | https://github.com/finnbear/simple_server_status/ |
max_upload_size | |
id | 596326 |
size | 26,258 |
A simple and fast way to get server status on Linux systems.
All features except conntrack
are enabled by default:
cpu
)
cpu_usage() -> Option<f32>
(0.0..=1.0)cpu_local_usage() -> Option<f32>
(0.0..=1.0)cpu_stolen_usage() -> Option<f32>
(0.0..=1.0, useful on VPS's to measure noisy neighbors)net
)
net_bandwidth() -> Option<u64>
(bytes/s)net_reception_bandwidth() -> Option<u64>
(bytes/s)net_transmission_bandwidth() -> Option<u64>
(bytes/s)ram
)
ram_usage() -> Option<f32>
(0.0..=1.0)ram_swap_usage() -> Option<f32>
(0.0..=1.0)tcp
)
tcp_connections() -> Option<usize>
(count)udp
)
udp_sockets() -> Option<usize>
(count)conntrack
)
conntrack_sessions() -> Option<usize>
(count)Note: Must call update()
first, to make a measurement.
Only supports Linux for now. Will return Err
, None
, or 0
on unsupported platforms,
depending on the operation.
Licensed under either of
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.