Short question: In Ubuntu, how can I find out how much network data each process has used at a certain time interval (e.g., last hour, last day, ...)?
Long question: I am connecting my Ubuntu machine to the internet using a mobile data plan. After several hours of connection, the data usage is more than 2 GB, which is a bit more than expected. So I would like to find out where does the data go. Searching on the internet, I found several tools, for example, nethogs. But nethogs only tells me the instantaneous bandwidth each process is using, which I do not care. Is there a tool that tells me how much network data each process has used at a certain time interval (e.g., last hour, last day, ...)?
Any tool that only shows the instantaneous bandwidth usage does not help. The data-eating process may be active for only a short time period that I do not know, so it is hard to tell which moment to monitor.
Any tool that only shows the total data usage of the machine or an interface (e.g., eth0, wwan0, ...) does not help. I already have that information from the data package provider.
Thank you for any comments.
dstat
mentioned at https://askubuntu.com/a/1230070/855322 seems to be promising. – FedKad Oct 11 '20 at 10:36