Closed qdii closed 7 years ago
Hi @qdii,
Actually listing most network heavy processes is not done. So it's a missing feature, and not a bug.
I did not find a way to get the network usage per process as a non-root user. There is a process level stat file provided by the kernel which lies, because the content of process level statistics /proc/1/net/netstat
equals to the content in global /proc/net/netstat
.
I tried to analyse Nethogs application and I found that it sniffs packets sent by applications and counts them. This operation needs root privilege. But I don't want to look into the packages, only interested in statistical data.
So if anyone can tell me a reliable method for accessing this data as regular user, then I would be able to implement this in the extension.
I understand, I will ask my colleagues if they have any idea on how to do that? In the meantime, would it be very complicated to display download/upload speeds for the main interfaces? Maybe rate the speed over the last 5 seconds.
It shouldn't be too difficult. I'll think about the possibilities.
I have the same issue.
I don't know any alternative to nethogs
to do that, but one thing that could be done is that if:
nethogs
is installed andsudo setcap "cap_net_admin,cap_net_raw+pe" $(which nethogs)
).Then, system-monitor could use it to monitor network traffic. Do you think it would make sense?
@bagage Well, it makes sense and that's possible. On the other hand I would like to rely on as less dependency as possible. Preferably:
So it would be nice if GLibTop library could provide per process network usage information. Unfortunately only network interface level statistics is available.
I totally agree with you - the upstream bug in GTop is Bug 768304. I added a comment on it to check current status.
@elvetemedve @bagage thanks for the heads-up on this, I had this on my TODO list since a long time (as GNOME libgtop and system-monitor maintainer), will do my best to help you out with this.
Showing network usage per interfaces has been implemented in version 9.
screenshot: https://cloud.dodges.it/s/9ObN5dJguoLlloi let me know how I can help you debug this