Created
July 5, 2016 09:04
-
-
Save njam/b525989145d06f40df2c71ff171bd066 to your computer and use it in GitHub Desktop.
Measure bandwidth with tcpstat + gnuplot
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
# Measure traffic with tcpstat | |
tcpstat -i em1 -o "%r\t%b\n" -s 30 0.1 > traffic.txt | |
# Create plot using the below script | |
gnuplot traffic.script > traffic.png | |
# Display plot | |
qlmanage -p 2>/dev/null traffic.png |
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
set term png small | |
set grid | |
set yrange [ -10 : ] | |
set title "Traffic" | |
set xlabel "seconds" | |
set ylabel "bits/s" | |
plot "traffic.txt" using 1:2 smooth csplines title "Bandwidth" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment