
我正在運行 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 提供了很多連結其網站上的監控工具