[ntp:questions] ntpd and database servers

unruh unruh at wormhole.physics.ubc.ca
Fri Jan 15 00:06:49 UTC 2010


On 2010-01-14, nodata <lsof at nodata.co.uk> wrote:
> Am 2010-01-14 20:38, schrieb Rob:
>> You could stop ntpd, and then use the adjtimex program to set the
>> clock rate to a slower value, so that the systems will lose time.
>> (using the --tick option)
>> Calculate how long it is going to take to arrive at the correct time
>> using the setting you decide on, and then come back to the system
>> (probably put an alert in your electronic calender) to check that the
>> time is slightly behind correct time.
>> Then reset the adjtimex setting to the normal rate and restart ntpd.
>> It will probably jump forward a little at that moment but that should
>> not matter.
>>
>
> Thanks for this.
>
> Would you mind explaining the link between CONFIG_HZ and the tick value? 
> The example in the man page is not clear (it uses the same tick value as 
> I have on a CONFIG_HZ=1000 box). Is the statement "Increasing val by 1 
> speeds up the system clock by about 100 ppm, or 8.64 sec/day." always 
> true, whatever the CONFIG_HZ value?

man adjtimes

  -t val, --tick val
              Set the number of microseconds that should be added to the
               system time for each kernel tick interrupt.  For a kernel with
              USER_HZ=100, there are supposed to be 100 ticks per second, so
              val should be close to 10000.  Increasing val by 1 speeds up the
              system clock by about 100 ppm, or 8.64 sec/day.  tick must be in
              the range 900000/USER_HZ...1100000/USER_HZ.  If val is rejected
              by the kernel, adjtimex will determine the acceptable range
              through trial and error and print it.  (After completing the
              search, it will restore the original value.)




More information about the questions mailing list