Created
January 9, 2016 01:54
-
-
Save samvignoli/0ba9d2030fced03d637c to your computer and use it in GitHub Desktop.
bandwidth simples =)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
while true; do cat /proc/net/dev; sleep 1; done | awk -v dc="date \"+%T\"" '/eth0/{i = $2 - oi; o = $10 - oo; oi = $2; oo = $10; dc|getline d; close(dc); if (a++) printf "%s %8.2f kbps in %8.2f kbps out\n", d, i/1000*8, o/1000*8}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment