ntpb a refclock
Jindra Fucik
fulda at seznam.cz
Tue Apr 8 11:16:25 CEST 2008
Ahoj vespolek,
hraju si s referencnima hodinama pro ntpd - konkretne seriova gps.
Narazil jsem na pro mne nepochopitelne chovani. Pri jednom z pokusu vse
fungovalo jak ma (viz CUT-1)
ovsem to bylo jen jednou. Beze zmeny konfigurace hned nasledujici spusteni
konci s chybou (viz CUT-2)
Teda podle toho logu to neni az tak moc zrejme, ze to je chyba, ale podle
ntpq se ten cas neakceptuje (viz CUT-3)
v konfiguraku nemam nic zasadniho (CUT-4) a do clockstats se taky pisou
spravne udaje (CUT-5)
---------------------------------------- CUT-1 ------------------------
# ntpd -n -l /dev/stdout
8 Apr 10:29:24 ntpd[31121]: logging to file /dev/stdout
8 Apr 10:29:24 ntpd[31121]: ntpd 4.2.0-a Sun Feb 10 20:54:04 CET 2008 (1)
8 Apr 10:29:24 ntpd[31121]: precision = 1.955 usec
8 Apr 10:29:24 ntpd[31121]: no IPv6 interfaces found
8 Apr 10:29:24 ntpd[31121]: kernel time sync status 2040
^C 8 Apr 10:32:06 ntpd[31121]: ntpd exiting on signal 2
-------------------------------------------------------------------------
---------------------------------------- CUT-2 ------------------------
# ntpd -n -l /dev/stdout
8 Apr 10:50:39 ntpd[31551]: logging to file /dev/stdout
8 Apr 10:50:39 ntpd[31551]: ntpd 4.2.0-a Sun Feb 10 20:54:04 CET 2008 (1)
8 Apr 10:50:39 ntpd[31551]: precision = 1.955 usec
8 Apr 10:50:39 ntpd[31551]: no IPv6 interfaces found
8 Apr 10:50:39 ntpd[31551]: kernel time sync status 2040
8 Apr 10:50:41 ntpd[31551]: clock GPS_NMEA(0) event 'clk_fault' (0x03)
8 Apr 10:50:41 ntpd[31551]: clock GPS_NMEA(0) event 'clk_okay' (0x00)
8 Apr 10:51:47 ntpd[31551]: clock GPS_NMEA(0) event 'clk_fault' (0x03)
8 Apr 10:51:47 ntpd[31551]: clock GPS_NMEA(0) event 'clk_okay' (0x00)
-------------------------------------------------------------------------
---------------------------------------- CUT-3 ------------------------
# ntpq -c pe
remote refid st t when poll reach delay offset
jitter
==============================================================================
cache1.sh.cvut. 195.113.144.201 2 u 6 64 1 6.013 -463.43
0.002
GPS_NMEA(0) .PPS. 0 l - 64 0 0.000 0.000
4000.00
-------------------------------------------------------------------------
---------------------------------------- CUT-4 ------------------------
# cat /etc/ntp.conf
#
# put your default configuration (e.g. broadcastclient) in here
#
driftfile /var/ntp/ntp.drift
statsdir /var/ntp/stat/
server time.sh.cvut.cz
server 127.127.20.0 mode 3 prefer
fudge 127.127.20.0 time1 0.000 flag3 1 refid PPS
enable pps kernel stats monitor
logconfig +clockall
statistics clockstats peerstats
-------------------------------------------------------------------------
---------------------------------------- CUT-5 ------------------------
# tail /var/ntp/stat/clockstats
54564 31971.137 127.127.20.0
$GPGGA,085250.000,5001.6872,N,01436.9492,E,0,00,,,M,,M,,*40
54564 32036.165 127.127.20.0
$GPGGA,085355.000,5001.6872,N,01436.9492,E,0,00,,,M,,M,,*44
54564 32100.174 127.127.20.0
$GPGGA,085459.000,5001.6872,N,01436.9492,E,0,00,,,M,,M,,*4F
-------------------------------------------------------------------------
More information about the Users-l
mailing list