Last active
December 10, 2015 04:08
-
-
Save sheeplogh/4379059 to your computer and use it in GitHub Desktop.
[shell] Get network throughput (Mbps, Average 10 minutes) on Linux machines from sar.
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
## Rx | |
$ LANG=C sudo sar -n DEV | grep eth0 | grep -v Average | awk '{print $1, $5*8/1048576}' | |
## Tx | |
$ LANG=C sudo sar -n DEV | grep eth0 | grep -v Average | awk '{print $1, $6*8/1048576}' | |
# Ex. | |
$ LANG=C sudo sar -n DEV -f /var/log/sa/sa24 | grep eth0 | grep -v Average | awk '{print $1, $6*8/1048576}' | |
... | |
23:20:01 4.32473 | |
23:30:01 3.23028 | |
23:40:01 2.73195 | |
23:50:01 3.35444 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment