I have a python script that uses urllibs to parse some web pages, and uses selenium to scrape pages with javascript, and I would like to know its cumulative bandwidth usage. I've looked at nethogs, but its tells me the usage per second, but won't tell me how much data the script has received or sent on eth0, for example.Ideally, I would want it to track all new processes after I start monitoring, and then keep a table of what each process has used as a total.Does such a tool exist? If not, is there a library in Python that I can implement in the script to track this?
Measuring Python script bandwidth usage
monitoring;python;bandwidth