Adding network usage information - #740
Conversation
|
Thanks for this! I think my issue was with windows, on macOS and FreeBSD, it's possible. I'll try to find time to implement the rest based on your starter. |
|
Ok, so, I'm going to fetch another way to have the network usage, but it seems to be hard. https://www.reddit.com/r/linux/comments/3tbhkf/does_reading_of_procpidnetdev_really_show_the/ |
|
I feel like the proper way to implement this is the: https://github.com/kaegi/netinfo way. That is:
To do this, |
|
So the netinfo crate does not seems to be actively maintained and has some outdated dependencies, so this should probably be reimplemented from scratch in sysinfo, with the added benefit to be able to probably reuse component between OS. |
This PR implements the fetching of network information for linux process using the
proc/{pid}/net/dev/information and summing up all bytes transmitted and received.Knowing that this is not implemented for all OSes, this PR is not intended to be merged and only serves as a reference for those who need network information. More info: #135