[LinuxPPS] refclock_nmea patch
Bernhard Schiffner
bernhard at schiffner-limbach.de
Mon Oct 29 21:27:15 CET 2007
On Monday 29 October 2007 20:46, Johan Bejeryd wrote:
...
> I'll try to record some data for several runs. It would be nice to see
> the script.
>
> /Johan
>
Nothing magic:
(Debian-System)
Hope, it helps!
--------------------
#!/bin/bash
#
# erzeugt Plots mit gnuplot
#
FILENAME="$HOME/plotinstructions"
LOGDIR="/var/log/ntpstats"
#LOGDIR="."
#LOGDIR="../ntpstats"
EXTENSION=`date -u +%Y%m%d`
#EXTENSION="udo_01"
#EXTENSION="20070530"
cat>$FILENAME <<EOF
set terminal png size 800,600 ; set output "ntp_logs_$EXTENSION.png"
set title "file : ntp_logs_$EXTENSION.png"
#
set grid
#
set key left
#
#set autoscale x
set xdata time
set timefmt"%s"
set xrange ["0":"86400"]
set xtics "0", 7200, "84600"
set format x "%H:%M"
set xlabel "time after 0:00 UTC of $EXTENSION"
#
#set autoscale y
set yrange [-5:5]
set ytics 1
set ytics textcolor lt 2
#set ylabel "ms"
set autoscale y2
#set y2range [66.5:67.5]
#set y2tics 0.1
set y2tics textcolor lt 3
#set y2label "ppm"
#
#
plot "$LOGDIR/loopstats.$EXTENSION" using 2:(1000*\$3) axes x1y1 title "
offset [ ms]" with lines lt 2,\
"$LOGDIR/loopstats.$EXTENSION" using 2:4 axes x1y2
title "frequency [ppm]" with lines lt 3
#
EOF
# plot
gnuplot $FILENAME
# cleanup
rm -f $FILENAME
exit 0
More information about the LinuxPPS
mailing list