I have developed an application and I want to measure how much network bandwidth it consumes in some typical test cases.
I found a few applications like nethog etc. however I am not sure how accurate its reports are!
I would like some way to very accurately measure the same as the results need to go into a report for a conference.
I’m willing to write customized solutions for the same if someone guides me how to!
I want something where I can run the monitoring program and my target application to get network usage statistics – cumulative bytes sent/rcvd. .. maximum usage and average usage
etc
Can the application be isolated on a single machine?
Does anything else have to run on the system?
If a system can be dedicated this way, periodically grab the last line from
/proc/net/netstatand subtract the corresponding values ofInOctetsandOutOctets.This system, Fedora 15, shows this after 23 days of uptime:
Of course, that format is unfriendly for here, but fairly nice for scripting languages to deal with. You can see the depth and variety of information! The last line shows that this system has read 24,434,248,973 bytes and written 4,218,365,129. (It is on day nine of scraping a large website.)