[ntp:questions] Re: PPS Output from NTP

Arthur.Porkchop at exemail.com.au Arthur.Porkchop at exemail.com.au
Tue May 10 03:32:27 UTC 2005


Tony wrote:
> Having a fairly large NTP deployment, I would like to perform a
> hardware
> measurement of one of the NTP servers (Stratum 3) against the PPS
> signal
> from the GPS on the Stratum 1 ....

Actually, a user-space program works quite well. I use the parallel
port to generate a 1 pps. The program sleeps till about 20ms or so
before the second ticks over, and goes into a tight loop, waiting
for the tick. When the tick occurs, it toggles some of the output
bits on the parallel port (root can do this in  user-space). As an
improvement the pulse is actually delayed  wrt the epoch
so that it doesn't compete with ntpd's timestamping. Of course, you get
scheduled out about once per day and miss the tick but that's OK. YMMV.

A improved solution that I use requires a PCI counter/timer card. In
conjunction with a 1 pps interrupt, it is used in such a way as to
eliminate interrupt service latency. And there's no ugly hard loop.

But Ulrich Windl's solution is probably all you need. We can track NTP
servers on the other side of Australia to 100us (with ms dispersion)
just using ntpd. You should be able to do a lot better on a LAN.

Cheers
Michael Wouters




More information about the questions mailing list