https://github.com/finnbear/simple_server_status
A simple and fast way to get server status on Linux systems.
https://github.com/finnbear/simple_server_status
rust rust-crate rust-lang server server-status status
Last synced: 5 months ago
JSON representation
A simple and fast way to get server status on Linux systems.
- Host: GitHub
- URL: https://github.com/finnbear/simple_server_status
- Owner: finnbear
- License: mit
- Created: 2022-05-29T03:37:44.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-08-08T20:27:45.000Z (over 1 year ago)
- Last Synced: 2025-04-02T04:47:22.575Z (10 months ago)
- Topics: rust, rust-crate, rust-lang, server, server-status, status
- Language: Rust
- Homepage: https://crates.io/crates/simple_server_status
- Size: 14.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE-MIT
Awesome Lists containing this project
README
# simple_server_status
A simple and fast way to get server status on Linux systems.
## Features
All features except `conntrack` are enabled by default:
- CPU (`cpu`)
- `cpu_usage() -> Option` (0.0..=1.0)
- `cpu_local_usage() -> Option` (0.0..=1.0)
- `cpu_stolen_usage() -> Option` (0.0..=1.0, useful on VPS's to measure noisy neighbors)
- Network (`net`)
- `net_bandwidth() -> Option` (bytes/s)
- `net_reception_bandwidth() -> Option` (bytes/s)
- `net_transmission_bandwidth() -> Option` (bytes/s)
- RAM (`ram`)
- `ram_usage() -> Option` (0.0..=1.0)
- `ram_swap_usage() -> Option` (0.0..=1.0)
- TCP (`tcp`)
- `tcp_connections() -> Option` (count)
- UDP (`udp`)
- `udp_sockets() -> Option` (count)
- Conntrack (`conntrack`)
- `conntrack_sessions() -> Option` (count)
Note: Must call `update()` first, to make a measurement.
## Limitations
Only supports Linux for now. Will return `Err`, `None`, or `0` on unsupported platforms,
depending on the operation.
## License
Licensed under either of
* Apache License, Version 2.0
([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)
* MIT license
([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)
at your option.
## Contribution
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.