[ntp:questions] ntp on ubuntu 12.10 with gps and pps.

2013-04-07 Thread Paul J R

Hi All,

I've got a SiRF star 3 GPS with a PPS line which im trying to get 
running on a machine with ubuntu 12.10 and a serial port using the DCD 
line for pps signalling. Took quite a while as the ntpd that ships with 
ubuntu 12.10 appears to be compiled without pps support (please correct 
me if im wrong here - but no matter what I do, the shipped version never 
tries to open /dev/pps0, gpspps0, etc etc and i've checked permissions 
and apparmor) - also theres alot of contradictory info on the net about 
how you get pps and gps operating this way (took some time to find that 
i needed flag1 1 in the gps settings - which alot of articles dont 
mention).


But, once it was up and running it appeared to work very well, after a 
few hours the jitter was down to below 0.01. Next I added in a few 
external time sources, and i ended up with this:


 remote   refid  st t when poll reach   delay offset  
jitter

==
 203.0.178.191   216.218.254.202  2 u   14   6438.704 990.003   
0.189 (my isp)
 203.82.209.217  18.26.4.105  2 u   18   643   62.372 997.624   
0.466 (pool server)
 202.127.210.36  223.255.185.22 u   19   643   22.454 1067.75   
1.747 (pool server)
 130.102.2.123   130.102.132.164  2 u   17   643   22.947 1000.23   
0.392 (pool server)
 202.125.45.77   223.252.32.9 2 u   17   643   24.810 1001.95   
0.849 (pool server)
*127.127.20.0.GPS.0 l78  3770.000 0.467   
0.209 (GPS)


Everythings almost exactly 1 second out. Reading around about this, it 
appears that this occurs cause theres possibly too many sentences coming 
across the 4800 baud serial line, is that correct?


After adjusting fudge time2, i ended up with with this:
 remote   refid  st t when poll reach   delay offset  
jitter

==
-203.0.178.191   216.218.254.202  2 u   51   64  3779.070 -5.518   1.423
-202.127.210.36  223.255.185.22 u   53   64  377   21.729 74.408   4.701
*203.192.179.99  223.252.32.9 2 u   48   64  377   22.956 17.581   3.551
+119.148.67.183  203.12.160.2 3 u   51   64  377   21.200 4.094   1.439
+203.192.179.98  203.35.83.2422 u   50   64  377   22.735 17.913  27.315
o127.127.20.0.GPS.0 l38  3770.000 5.080   0.193


and a few hours later:
 remote   refid  st t when poll reach   delay offset  
jitter

==
+203.0.178.191   216.218.254.202  2 u   44   64  3779.041 -10.309   
0.356

+202.127.210.36  223.255.185.22 u   50   64  377   21.547 64.812   6.039
+203.192.179.99  210.9.192.50 2 u   35   64  377   23.000 -0.256   2.525
-119.148.67.183  203.12.160.2 3 u   48   64  377   21.006 -15.580   
4.364

-203.192.179.98  203.35.83.2422 u   49   64  377   23.130 74.392  26.231
o127.127.20.0.GPS.0 l48  3770.000 -0.065   0.003


and the config i've ended up with is:
server 127.127.20.0 mode 1 minpoll 2 maxpoll 4 prefer
fudge 127.127.20.0 flag1 1 flag2 0 flag3 1 time2 1.0

Seems like a pretty decent little gps unit, assuming i've got it 
functioning and configured correctly?


___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] ntp on ubuntu 12.10 with gps and pps.

2013-04-07 Thread David Taylor

On 07/04/2013 11:14, Paul J R wrote:

Hi All,

I've got a SiRF star 3 GPS with a PPS line which im trying to get
running on a machine with ubuntu 12.10 and a serial port using the DCD
line for pps signalling.

[]

o127.127.20.0.GPS.0 l48  3770.000 -0.065
0.003

[]

Seems like a pretty decent little gps unit, assuming i've got it
functioning and configured correctly?


Just for comparison:

Intel Atom PC running FreeBSD 8.2 (Pixie):
o127.127.20.1.PPS. offset/jitter -0.001   0.002

Two Raspberry Pis running Linux 3.2.27+
o127.127.22.0.PPS. offset/jitter 0.002   0.002
o127.127.22.0.PPS. offset/jitter 0.001   0.002

Raspberry Pi running Linux 3.36.11
o127.127.22.0.PPS. offset/jitter 0.000   0.002

65 microseconds offset seems a little high to me, but the PCs I've just 
quoted are all (mostly) /only/ serving NTP.  I have been doing a little 
installation work on Raspberry Pi #3 today, and it now has a steady CPU 
and network I/O load.  Its PPS was only configured yesterday. 
Performance graphs are here:


  http://www.satsignal.eu/mrtg/performance_ntp.php

I hope that helps your comparisons.
--
Cheers,
David
Web: http://www.satsignal.eu

___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


[ntp:questions] Syncing and peering for a multi-continent deployment

2013-04-07 Thread Blair Zajac
I'm working on deploying a large number of servers to data centers on 
three continents, say US, Europe and India.  Because each data center 
will be writing data and timestamping the data, I want them all to think 
they are at the same time, even if it isn't exactly the correct UTC 
time.  The data will be synced to other data centers, so relative 
ordering of when something happened can be important.


To not ping stratum-1 and -2 level servers from a large number of boxes, 
I'm setting up three stratum-3 NTP servers in each data center.


Here's what I've read:

1) Each ntp server should have 4 to 7 upstream clocks [1], [2], [3].

2) The three stratum-3 NTP servers in each data center should be peers 
of each other [4].  So each NTP server would have at most 2+7=9 connections.


Questions:

1) Should each data center use nearby stratum-2 clocks or pick a set of 
stratum-2 clocks that are network wise in the center between all data 
centers (it may not be possible to get a true center)?


2) Should each stratum-3 server in a single data center use all 4-7 
upstream clocks?  Or should the 4-7 be split between the three stratum-3 
servers?  The diagram at [4] suggests they should be split?  If that's 
the case, then how are falsetickers identified?


3) Should I have all the stratum-3 servers in each data center be peers 
of each other, so each would have 8 peers?  This would ensure that all 
my clocks think they are at the same time.  If I do this, then I would 
need to increase maxclocks to support up to 7 (upstream) + 8 (peers)=15 
clocks?


4) Or, should I not peer data centers to each other and trust that the 
stratum-2 clocks near each data center will be close to the other clocks?


Other random questions:

1) It doesn't appear that its necessary to set up symmetric keys for peers?

2) Is there a way to tell which peer is the master peer?  Looking 
through ntpdc and ntpq I didn't see anything.


Thanks,
Blair

[1] http://support.ntp.org/bin/view/Support/SelectingOffsiteNTPServers#Secti
[2] http://support.ntp.org/bin/view/Support/SelectingOffsiteNTPServers#Secti
[3] http://support.ntp.org/bin/view/Support/StartingNTP4#Section_7.1.4.3.2.
[4] http://www.ntp.org/ntpfaq/NTP-s-config-adv.htm#AEN3101
___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] Syncing and peering for a multi-continent deployment

2013-04-07 Thread John Hasler
Blair Zajac writes:
 1) Each ntp server should have 4 to 7 upstream clocks [1], [2], [3].

Each NTP server should have a GPS receiver.  Fall back to the Internet
if GPS goes down.
-- 
John Hasler 
jhas...@newsguy.com
Dancing Horse Hill
Elmwood, WI USA

___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions