Created
May 3, 2014 11:57
-
-
Save tosihisa/7978b6497f57e506589e to your computer and use it in GitHub Desktop.
ntpd の loopstats 内にある offset を読み込んで 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
#!/bin/sh | |
# ntpd 'loopstats' to gnuplut | |
# loopstats_gnuplot.sh FILENAME RANGE TICS | |
TITLE=`basename $1` | |
gnuplot << EOF | |
set terminal png | |
set output "$1_$2_$3.png" | |
set yrange[-$2:$2] | |
set xrange [0:86400] | |
set grid ytics | |
set ytics -$2,$3 | |
set mytics 10 | |
set title "ntpd $TITLE" | |
set ylabel "offset (micro-seconds)" | |
set xlabel "UTC seconds" | |
plot "$1" using 2:(\$3*1000000) notitle with lines | |
EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment