[ntp:questions] dynamic stratum changes

Miroslav Lichvar mlichvar at redhat.com
Fri May 12 09:27:20 UTC 2017


On Tue, May 09, 2017 at 02:56:46PM +0000, Szuch, Paul wrote:
> Hi, I'm setting up ntp on an isolated net.
> Some of our linux machines run a custom time protocol that synchronizes the kernel to GPS time to sub millisecond accuracy.
> I've got my ntpd.conf using the local oscillator (127.127.1.1) clock at stratum 1.
> 
> I'm looking to see what I should do when my custom time protocol has an error and can't synchronize time anymore.
> I would like to degrade my stratum so that other machines will choose a better source of time, depending on how bad my custom protocol fails.

Degrading the stratum is not enough for NTP clients to ignore that
source. It could still break their selection. It should change its
leap status to unsynchronized (or change stratum to 0), or increase
its root dispersion as NTPv4 servers normally do when they lose their
synchronization.

> I'd rather not kill and restart ntpd, as that just puts load on the machine for no good reason, and seems very inelegant.
> I looked into ntpdc "fudge" command, but it doesn't support the stratum option.
> Is there some elegant way of making the local ntpd change its reported stratum?
> 
> Do I have to customize the local oscillator driver to input the health status?

I think a good approach would be to modify your driver to work as a
SHM reference clock and let ntpd synchronize the system clock.

-- 
Miroslav Lichvar


More information about the questions mailing list