[ntp:questions] Initial sync on starting ntpd with 20-21 minute time difference

Harlan Stenn stenn at ntp.org
Thu Sep 27 01:12:16 UTC 2018


Karen Austin writes:
> Hi,
>
> We have a RH 6.8 server with ntpd installed, but not currently running.
>
> The time on this server is showing around 20-21 minutes ahead.
>
> The server has been restarted and the messages log shows a successful ntpd st
> art, but it is no longer running.

This is because of the 'panic gate' check I'll mention, below.

> I would like to attempt to manually start the daemon but am concerned that th
> e local time will then 'jump' to the correct time, which may affect applicati
> ons on the server.
>
> Can anyone confirm that the time will sync gradually?
>
> Many thanks

ntpd will exit if the system time differs from 'upstream' time by more
than 1000 seconds (the panic gate).

There are startup options to slew time corrections instead of stepping
them. 'ntpd -x' will slew up to 600 seconds' difference.  There are
config options to make this window longer, but note that ntpd will
correct these at the rate of 1 second in about 33 minutes' time, so a 20
minute correction will take over 660 hours' time to apply.  That's more
than 27 days' time.

Forward time steps are generally 'safe'.  Backward time steps are not,
as they violate ACID assumptions for databases.

We recommend the following startup sequence:

- Start ntpd as soon as possible in the boot process,
- Using the -g options *at cold-start only* to set the clock initially.
- Start all other applications that do not require sync'd time.
- run ntp-wait (perhaps with -v) to wait for the clock to sync.
- Start the applications that require sync'd time.

Note that depending on what this system is being used for, there might
be other considerations during the time the system clock is wrong.  This
depends on how accurate your timestamping requirements are.

-- 
Harlan Stenn <stenn at ntp.org>
http://networktimefoundation.org - be a member!


More information about the questions mailing list