我正在运行 Ubuntu 12.04,NTP 服务器运行正常。我在两台 Windows 7 机器上运行 Meinberg NTP 服务器,并使用其关联的服务器监视器来跟踪其运行情况。
是否有类似的 Linux 监视器,最好是带有 GUI 的监视器,可以显示我的时钟运行情况等?
答案1
这不是对你问题的准确回答,但我看到你提到你现在使用一个分析 /var/log/ntp/loopstats 的 gnuplot 脚本。我也这么做,下面是我自己使用的脚本。
如果有人做得更好,我也会好奇。
#! /usr/bin/gnuplot
# Remember to check you have these lines in /etc/ntp.conf and that ntpd is actually running:
# statsdir /var/log/ntpstats/
# statistics loopstats peerstats clockstats
# filegen loopstats file loopstats type day enable
# filegen peerstats file peerstats type day enable
# filegen clockstats file clockstats type day enable
# Resolution: fullscreen
set term x11 size `xrandr | awk '/\*/{sub(/x/,",");print $1; exit}'`
set grid
set bars 0.4
set y2tics
set y2range [0:]
set ytics nomirror
set xdata time
set timefmt "%s"
set format x "%T"
set title "NTP statistics"
set ylabel "Clock offset / Roundtrip delay (ms)"
set y2label "Frequency offset (seconds per day)"
set xlabel "Time of day"
local_time = `date +%s --utc -d "12:00:00 $(date +%z)"`
utc_time = `date +%s --utc -d "12:00:00"`
localdifferencefromUTC = utc_time - local_time
timeoffsettoday = `date +%s --utc -d "today 0:00"` + localdifferencefromUTC
plot \
"/var/log/ntpstats/loopstats" u ($2+timeoffsettoday):($3*1000):($5*1000/2) t "Clock offset" w errorlines lt 1 lw 2 pt 187, \
"/var/log/ntpstats/peerstats" u ($2+timeoffsettoday):($6*1000):($8*1000/2) t "Roundtrip delay" w errorbars lt 26 pt 26,\
"/var/log/ntpstats/loopstats" u ($2+timeoffsettoday):($4*0.0864):($6*0.0864/2) axes x1y2 t "Frequency offset" w errorline lt 7 pt 65,\
0 w l lt -1
pause mouse close
答案2
ntp.org 提供许多链接网站上的监控工具