Skip to content

Instantly share code, notes, and snippets.

@apk
Created November 17, 2011 09:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save apk/1372803 to your computer and use it in GitHub Desktop.
Save apk/1372803 to your computer and use it in GitHub Desktop.
gunplotify a ping log
#!/bin/sh
# 64 bytes from 94.199.xxx.yyy: icmp_seq=0 ttl=49 time=29992.055 ms^M
sed -ne 's/^.*icmp_seq=\([0-9][0-9]*\) .*time=\([0-9][.0-9]*\) .*$/\1 \2/p' <fonic.ping.log >tmp
gnuplot <<EOF
set terminal png size 2048,512
set output "fonig.png"
set title "ping times"
set xrange [0:4060]
set grid
set log y
plot "tmp" using 1:2 with lines title "ping"
EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment