17

I want to measure how much bandwidth git pull uses, preferably by prefixing git command with desired program, i.e. nettally git pull

Alternatively, is there some sneaky way to accumulate nethogs / wireshark data and add up the figures after execution?

Thanks

caduceus
  • 305

2 Answers2

23

If you launch nethogs and then press the m key, it will switch from instantaneous mode (kB/s) to cumulative mode (kB).

Phrogz
  • 564
0

Wrap the command in a SOCKS client (eg. dante-client), point SOCKS at a server (eg. socat/netcat) which will measure traffic and forward to the real SOCKS server. There will be a SOCKS overhead, but presuming you don't need an exact measure then just factor this in.

A shell script could set up the socat sockets and LD_PRELOAD_PATH environment, run the command and report stats once done.