1
3
I often write :
time npm install
which will give me as a result :
real 0m22.933s
user 0m24.058s
sys 0m3.346s
I would like to have the same type of information, but for network consumption.
For example,
netmeasure npm install
would return :
Upload : 499kb
Download : 44MB
That would be useful to be able to do "regression tests" on some programs.
Is is possible to get this kind of information with simple unix tools ?
I have already tried nethogs
, but it is something very interactive, which might be useful if you want to know what is happening on one full unix system, but I'm interested in measuring the network consumption of one command. I'm not looking for an interactive program, but one that will spawn the process for me and wait until it exists to show those statistics.
I have found https://github.com/jonasdn/nsntrace that looks like a good tool, but inside nsntrace, I have no connectivity (see issue https://github.com/jonasdn/nsntrace/issues/22)