#lang #language #status #server #net #tcp #linux #cpu #ram #server-status

simple_server_status

Simple cpu, ram, net, and tcp status for Linux servers

2 unstable releases

Uses new Rust 2021

0.2.0 May 29, 2022
0.1.0 May 29, 2022

#1047 in Development tools

Download history 31/week @ 2022-08-07 33/week @ 2022-08-14 3/week @ 2022-08-21 3/week @ 2022-08-28 5/week @ 2022-09-04 1/week @ 2022-09-11 8/week @ 2022-09-18 1/week @ 2022-09-25 25/week @ 2022-10-02 26/week @ 2022-10-09 24/week @ 2022-10-16 18/week @ 2022-10-23 28/week @ 2022-10-30 25/week @ 2022-11-06 20/week @ 2022-11-13 12/week @ 2022-11-20

89 downloads per month

MIT/Apache

22KB
526 lines

simple_server_status

A simple and fast way to get server status on Linux systems.

Features

All features are enabled by default:

  • CPU (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)
  • Network (net)
    • net_bandwidth() -> Option<u64> (bytes/s)
    • net_reception_bandwidth() -> Option<u64> (bytes/s)
    • net_transmission_bandwidth() -> Option<u64> (bytes/s)
  • RAM (ram)
    • ram_usage() -> Option<f32> (0.0..=1.0)
    • ram_swap_usage() -> Option<f32> (0.0..=1.0)
  • TCP (tcp)
    • tcp_connections() -> Option<usize> (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

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.

No runtime deps

Features

  • cpu
  • net
  • ram
  • tcp