valpackett / systemstat

Rust library for getting system information | also on https://codeberg.org/valpackett/systemstat
https://crates.io/crates/systemstat
The Unlicense
616 stars 71 forks source link

Swap support #93

Closed davidkna closed 2 years ago

davidkna commented 2 years ago

In addition to memory()-usage also report swap usage. I would be willing to implement this myself.

Would you prefer this as a separate swap() function or as a part of memory()? Some platform-APIs will return memory and swap information together.

davidkna commented 2 years ago

So would you accept a PR with initial swap support for Linux, macOS and Windows? I think putting it into a separate function best and maybe implementing TryFrom between memory and swap types.

valpackett commented 2 years ago

Yes, sure, let's see how that looks