Skip to content

Instantly share code, notes, and snippets.

@mchelen
Forked from Noktec/gnuplot.gnu
Last active August 12, 2017 01:23
Show Gist options
  • Save mchelen/43b289e66e7f410835f8 to your computer and use it in GitHub Desktop.
Save mchelen/43b289e66e7f410835f8 to your computer and use it in GitHub Desktop.
#Use the testping.sh script to retrieve the times of a Pings
#Then use the following script to plot it with gnuplot
set terminal pdfcairo font "Gill Sans,9" linewidth 2 rounded fontscale 1.0
set output "ping.pdf"
set ylabel "Time in milliseconds"
set xlabel "Number of Pings"
plot "pingTimes.dat" w lp
#!/bin/bash
ping -c 100 google.com | gawk -F= 'NF>1{print $NF+1;fflush()}' | tee pingTimes.dat
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment