[ntp:questions] Remaining synced on an unsynchronised peer?

unruh unruh at wormhole.physics.ubc.ca
Thu Dec 3 22:27:02 UTC 2009


On 2009-12-03, michael.buetow at comsoft.de <michael.buetow at comsoft.de> wrote:
> On Dec 3, 7:16?pm, unruh <un... at wormhole.physics.ubc.ca> wrote:
>
>> Apparently ntp has a command option called noselect, which tells ntp
>> never to select that host as a source. It is useful for using A to keep
>> track of B by periodically sending B packets to see what B's time is,but
>> never to use it as a source. It sounds like that is what you want. (I
>> have heard this as a rumour in a chrony discussion, so will have to let
>> you look up the details-- sorry)
>
> I don't think that's will help me here (but thanks for pointing out
> this option - I also didn't know about it).
>
> My host1/host2 can independently lose touch with their external
> sources, in which case I want the one that still has outside
> reachability to be used as time source for its partner (symmetric
> peer).

You stated that you never wanted them to be servers for each otehr, now
you say you do sometimes want them to be. 

Anyway, you could have a script which does an ntpq on each other them,
and if it finds that both have disconnected from the external world you
have the script rewrite the ntp.conf file. Or you can take the source
code for ntpd and rewrite it to do what you want. Those seem to be your
two options. Take whichever you find easier. Remember kludges have a
long long pedigree in engineering.

> And the rest of my "server" definitions are external servers which I
> definitely do want to sync from too. Only that one of them shall be
> preferred.




More information about the questions mailing list