elC0mpa / gonet

MIT License
2 stars 0 forks source link

Implement the network information gathering for both mac and linux #3

Open elC0mpa opened 1 day ago

elC0mpa commented 1 day ago

The main goal of this task is to find the way to get the core of our package resolved. I mean, how to get how much band with every process has used in certain period of time

This should be done for Linux and MacOS, probably using golang os core module

evert-arias commented 1 day ago

Upon further investigation, it appears that the OS module does not provide any information related to networking. Therefore, we need to determine if there is a built-in module (preferably) that can be used for this purpose or as a last resort, a third-party library. I will delve deeper into this and provide an update.

elC0mpa commented 1 day ago

Upon further investigation, it appears that the OS module does not provide any information related to networking. Therefore, we need to determine if there is a built-in module (preferably) that can be used for this purpose or as a last resort, a third-party library. I will delve deeper into this and provide an update.

Perfect, eager to hear about this!!

elC0mpa commented 1 day ago

@evert-arias maybe this could help https://github.com/gherlein/gonetmon

elC0mpa commented 1 day ago

@evert-arias this is another source I think we could use: https://medium.com/cyberark-engineering/golang-monitoring-made-easy-with-version-1-16-df06f7477d75 In this article the author talks about a package called runtime/metrics

evert-arias commented 1 day ago

@evert-arias maybe this could help https://github.com/gherlein/gonetmon

I'll check this out.

elC0mpa commented 1 day ago

@evert-arias this is another source I think we could use: https://medium.com/cyberark-engineering/golang-monitoring-made-easy-with-version-1-16-df06f7477d75 In this article the author talks about a package called runtime/metrics

I already checked this and it doesn´t work for network stats

evert-arias commented 23 hours ago

@evert-arias this is another source I think we could use: https://medium.com/cyberark-engineering/golang-monitoring-made-easy-with-version-1-16-df06f7477d75 In this article the author talks about a package called runtime/metrics

I already checked this and it doesn´t work for network stats

Exactly, can confirm.

evert-arias commented 23 hours ago

The following are the third-party options available:

My research suggests that https://github.com/shirou/gopsutil is the best cross-platform option. I’ll explore the library further.

evert-arias commented 23 hours ago

The following are the third-party options available:

My research suggests that https://github.com/shirou/gopsutil is the best cross-platform option. I’ll explore the library further.

Actually we can ignore https://github.com/drael/GOnetstat

evert-arias commented 23 hours ago

These are the library's supported architectures: image