I haven't found a great way to show the number of TCP / UDP connections by processes in a cgroup. I propose the following:
- Iterate through PIDs in a cgroup
- Look at /proc//net/tcp for the number of TCP connections for a given process.
- Sum up the number of connections.
github.com/prometheus/procfs should be able to help with the heavy lifting of fetching TCP metrics.
I haven't found a great way to show the number of TCP / UDP connections by processes in a cgroup. I propose the following:
github.com/prometheus/procfsshould be able to help with the heavy lifting of fetching TCP metrics.