Subject: Re: /dev/clock pseudodevice
To: Alan Barrett <apb@cequrux.com>
From: Frederick Bruckman <fredb@immanent.net>
List: tech-kern
Date: 08/01/2001 11:42:27
On Wed, 1 Aug 2001, Alan Barrett wrote:

> On Tue, 31 Jul 2001, Bill Studenmund wrote:
> > Also, say there are times when ntpd NEEDS to set the date back
> > (like say there's a network outage, and the clock has drifted
> > forward & needs to be scooted back). Preventing ntpd from moving
> > the clock back can, in such a case, make it unable to do its job.
> > So systems which need the clock set right will fail.
>
> I *never* want ntpd to make time appear to jump backwards.

I think there is a compile-time option for that (in the portable
release). You're not suggesting that be the default?

> If ntpd thinks it wants to jump time backwards or forwards by a small
> amount, I want it to rather make the clock run slower or faster until
> real time and clock time are in sync again.

"Slew always" = "-x" is a run-time option, and it's always been there.
This also has the effect of never making the clock jump (step) backwards.

> If it thinks it wants to
> jump time backwards or forwards by a large amount, I want it to rather
> give up and scream for help.  Depending on the system, I'd probably
> put the boundary between a small and a large change somewhere between
> 5 seconds and 5 minutes.

Are you in luck! With not quite released ntp 4.1, you can adjust the
panic threshold in the "ntp.conf" file. Your request is met by putting
"tinker panic 5", "tinker panic 300", or something in between, as the
first line of that file (and adding "ntpd_flags=-x" to
"/etc/rc.conf"). [If "tinker" isn't in current yet, you can install
the package and adjust the paths in "/etc/rc.d/ntpd".]

There are even more tweaks available with ntp 4.1, all with an eye to
allowing users to experiment with different theories and methods of
keeping synced in the face of network outages, congestion, (and
dial-ups), because this is the hot area for continuing research. To
get back on the topic, if you take all those options out of "ntp.conf"
and put them in the kernel, you're going to lose something.


Frederick