I can use the time command to measure the time some command takes:
time node -e ""
node -e "" 0.06s user 0.01s system 92% cpu 0.076 total
Is there a similar way to measure a command's network traffic (the bandwidth it used, the hosts it sent requests to, etc)? What is the best solution for this use case?
man time
. Will the socket reads/writes (%r
,%s
) help?