Ask Bjørn Hansen wrote:

On Feb 23, 2015, at 4:37 PM, Harlan Stenn <st...@ntp.org> wrote:

You might not need orphan mode at all - just the plain local refclock
driver.

You might also just need a "customized" leapseconds file.

Yeah, that was my first test — just:

server 127.127.1.1 minpoll 4 maxpoll 5
fudge  127.127.1.1 stratum 4
leapfile "/etc/ntp/leap-seconds.list"

Hm, alternatively you may use the first instance of the local clock, 127.127.1.0. I don't think this matters, though. ;-)


I've just run a few tests with such setup and ntpd 4.2.6p5 vs. 4.2.8p1.

Set the current system time close enough before the leap time, which may be some ( less than 24) hours, or just 10 minute. Then start ntpd.


With 4.2.6p5:

The "local clock" becomes "system peer" immediately after startup, and leap bits are also set to "01" immediately. This is very nice for leap second testing, but letting "local clock" become "system peer" immediately causes some drawbacks in normal operation.


With 4.2.8p1:

The "local clock" becomes "system peer" only quite some time (about 300 seconds) after ntpd has been started, and another 7 seconds after this the leap bits are changed to "01". I'm not sure where the ~300 s come from since they vary slightly with the polling interval configured for the "local clock":

With minpoll 3 or 4 local clock becomes system peer @305 s after startup
With minpoll 5 or 6 local clock becomes system peer @321 s after startup


In any case the testing works if you wait until "local clock" becomes "system peer".


An alternate way is to fudge the local clock to "flag1 1" which lets the local clock provide ntpd with a leap second warning, even without using a leap second file.

This works with both 4.2.6p5 and 4.2.8p1.

However, while ntpd's system leap flags go back to "00" after the leap second the "local clock"'s leap flags stay at "01", so if you let the ntpd running after the initial test it will probably insert another leap second at the end of each month (not tested).

The documentation[1] says that “orphan mode” is the replacement for the local 
clock, so that’s why I tried that too.  (It also says that since 4.2.5p101 ntpd 
can run in “pure orphan mode”, so that’s why I tried it that way, too).

I've not yet tested orphan mode.


Martin
--
Martin Burnicki

Meinberg Funkuhren
Bad Pyrmont
Germany

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

Reply via email to