You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I love Python and psutil but bundling a Python app is a pain.
Having a psutil library in Nim seemed like the logical next step.
Install
nimble install psutil
This package works Ok as of Nim 1.0.6. Pull requests welcome.
Usage
Just some basic usage below until I get the example apps working and can mirror
what's in psutil's documentation. Take a look at the scripts folder for some
basic examples as well.
If you are running on CentOS or RedHat you may or may not find errors with the Network related functions,
complaining about missing Linux C Headers sockios.h to Compile,
this is not a Bug on the code but that Distro not having development libraries or having too old versions of it.
You can try installing the package kernel-headers for CentOS/RedHat,
to see if that fixes the problem about missing libraries.
If you know how to fix that Distro-specific detail feel free to send pull requests.
whennot detectOs(CentOS):
# Do something here with the Network functions.
echo net_io_counters()
echo per_nic_net_io_counters()
echo net_if_stats()
echo net_connections()
Stars
Contribute
PRs accepted! Adding a single function to any platform is a huge help and can usually be done with less than an hour of work.