[ntp:questions] ntp drops gps/pps - lets time drift

David Lord snews at lordynet.org
Thu Jun 9 19:54:56 UTC 2011


M Z wrote:
> I am trying to get an independently clocked SuSE 11.2 machine based on just 
> GPS/PPS. I am using
> gpsd 2.95 with garmin 17 serial port but also have tried this with globalsat 
> mr350p. gpsd/cgps shows 3D 
> 
> signal lock. ntpq Ver. 4.2.6p2
> 
> *** HERE IS THE PROBLEM/Question ***
> When I have an outside source, like 0.us.pool.ntp.org or tick.usask.ca, ntp uses
> the PPS signal perfectly. When I drop the outside source or substitute with 
> 127.127.0.1,
> NTP x's out my PPS and then GPS (when reach is 177) even though it is a good 
> signal.
> How can I force ntp to use the PPS signal or at least not drop it?
> ************************************
> 
> clocksource is tsc which seems to work a little better (also tried hpet, same 
> problem)
> I also tried it with none of the 'restrict' clauses and without 'disable'.
> 
> clip from ntp.conf:
> #Must use disable for SuSe since the internal micro-nano timekeeping
> #conflicts with ntp and causes excess jitter ( > .010 microsec ).
> disable kernel
> server 127.127.28.0  minpoll 4
> fudge 127.127.28.0  time1 0.290 refid GPS stratum 3  #garmin
> server 127.127.28.1  minpoll 4 prefer
> fudge 127.127.28.1  refid PPS

Try with prefer for the refclock rather than the PPS

server 127.127.28.0  minpoll 4 prefer


and don't use 127.127.0.1


David

> server tick.usask.ca iburst    #stratum one canada server
> driftfile /var/lib/ntp/drift/ntp.drift   #(has had values from -70 to 13)
> restrict -6  ::1
> restrict 127.0.0.1
> restrict default  kod nomodify notrap nopeer noquery
> restrict tick.usask.ca  mask 255.255.255.255 nomodify notrap noquery
> 
> Soon after restart:
> ra2:# ntpq -p
>      remote           refid      st t when poll reach   delay   offset  jitter
> ==============================================================================
> +SHM(0)          .GPS.            3 l    3   16    3    0.000   14.703   1.701
> *SHM(1)          .PPS.            0 l    2   16    3    0.000  -119.90   1.930
> +tick.usask.ca   .GPS.            1 u    7   64    1   92.725  -109.97   3.086
> 
> after 12+ HOURS  looks good to me:
> ra2:~> /usr/sbin/ntpq -p
>      remote           refid      st t when poll reach   delay   offset  jitter
> ==============================================================================
> xSHM(0)          .GPS.            3 l    7   16  377    0.000  108.591  32.540
> *SHM(1)          .PPS.            0 l    6   16  377    0.000    0.007   0.000
> xtick.usask.ca   .GPS.            1 u   41   64  377   92.184    6.839   0.316
> ra2:~> /usr/sbin/ntpq -p
>      remote           refid      st t when poll reach   delay   offset  jitter
> ==============================================================================
> xSHM(0)          .GPS.            3 l    2   16  377    0.000   62.204  24.780
> *SHM(1)          .PPS.            0 l    1   16  377    0.000    0.007   0.000
> +tick.usask.ca   .GPS.            1 u    3   64  377   92.184    6.839   0.318
> ra2:~> /usr/sbin/ntpq -p
>      remote           refid      st t when poll reach   delay   offset  jitter
> ==============================================================================
> xSHM(0)          .GPS.            3 l   15   16  377    0.000   83.603  17.002
> *SHM(1)          .PPS.            0 l   14   16  377    0.000    0.009   0.001
> xtick.usask.ca   .GPS.            1 u   48   64  377   92.184    6.839   0.318
> 
> 
> So, to run without external sources I run both without and with localclock:
> 
> without 127.127.1.0 (SHM (GPS/PPS) only):
> ra2:# ntpq -p
>      remote           refid      st t when poll reach   delay   offset  jitter
> ==============================================================================
> xSHM(0)          .GPS.            3 l   13   16  177    0.000  122.103   6.617
> xSHM(1)          .PPS.            0 l   12   16  177    0.000   -0.113   0.153
> ra2:# ntpq -p
>      remote           refid      st t when poll reach   delay   offset  jitter
> ==============================================================================
> xSHM(0)          .GPS.            3 l    7   16  377    0.000  112.004  10.735
> xSHM(1)          .PPS.            0 l    6   16  377    0.000   -0.186   0.018
> ra2:# ntpq -p
>      remote           refid      st t when poll reach   delay   offset  jitter
> ==============================================================================
> xSHM(0)          .GPS.            3 l   11   16  377    0.000   23.303  11.474
> xSHM(1)          .PPS.            0 l   10   16  377    0.000  -114.74   2.993
> 
> # With localclock
> # LCL is unsynchronized
> server 127.127.1.0 minpoll 8
> fudge 127.127.1.0 refid clk_internal stratum 15
> 
> ra2:# ntpq -p
>      remote           refid      st t when poll reach   delay   offset  jitter
> ==============================================================================
> xSHM(0)          .GPS.            3 l   11   16  177    0.000   75.604  25.541
> *SHM(1)          .PPS.            0 l   10   16  177    0.000   -0.119   0.136
>  LOCAL(0)        .clk_.          15 l    -  256    0    0.000    0.000   0.000
> ra2:# ntpq -p
>      remote           refid      st t when poll reach   delay   offset  jitter
> ==============================================================================
> xSHM(0)          .GPS.            3 l    4   16  377    0.000   67.604  30.856
> xSHM(1)          .PPS.            0 l    3   16  377    0.000   -0.107   0.124
>  LOCAL(0)        .clk_.          15 l    -  256    0    0.000    0.000   0.000
> ra2:# ntpq -p
>      remote           refid      st t when poll reach   delay   offset  jitter
> ==============================================================================
> xSHM(0)          .GPS.            3 l    2   16  377    0.000   58.803   8.170
> xSHM(1)          .PPS.            0 l    1   16  377    0.000    0.077   0.014
> *LOCAL(0)        .clk_.          15 l   32  256    7    0.000    0.000   0.000
> 
> using ntpd -ddd there are some early lines:
> select: survivor 127.127.28.1 5.291672
> select: survivor 127.127.28.0 8.291827
> select: combine offset -0.047243999 jitter 0.000000477
> event at 2 SHM(1) 963a 8a sys_peer
> but then later:
> select: survivor 127.127.28.0 3.057312
> select: combine offset 0.087603614 jitter 0.021384352
> event at 97 SHM(0) 961a 8a sys_peer
> and then no survivors at all:
> event at 98 0.0.0.0 0418 08 no_sys_peer




More information about the questions mailing list