How can I "box" a command line app or a script im running, to tell how much bandwidth it used?

e.g. I want to run wget -rk http://example.com. Now this example is easy, since wget can report it's own bandwidth. But if im invoking several wget instances in a script, that requires me to start writing code to add the numbers up. If i'm using additional tools in the script that use the network, i need to make sure to add into the calculation the bandwidth that they generate.

This sounds complex, and I'm wondering if I could just measurebandwidthAndExecute ./script.sh?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.