1

In ntpd the kernel copies the system time to the hardware clock every 11 minutes.

However, if the system time and hardware clock are more than 30 minutes out of sync this copy does not happen and the system and hardware clock remain out of sync.

Is there any way to have 11-minute mode work if the system and hardware clock are more than 30 minutes out of sync, or is there any other tool to use to automatically sync the system and hardware clock?

5

To sync NTP that is out of the clock for more than the panic threshold e.g. if the time is substantially off, you either call ntpd with the -g option:

-g Normally, ntpd exits with a message to the system log if the offset exceeds the panic threshold, which is 1000 s by default. This option allows the time to be set to any value without restriction; however, this can happen only once. If the threshold is exceeded after that, ntpd will exit with a message to the system log. This option can be used with the -q and -x options.

And you put in /etc/ntp.conf:

tinker panic 0

By default, the NTP daemon sometimes panics and exits if the underlying clock appears to be behaving erratically. This option causes the daemon to keep running instead of panicking.

tinker panic 0 is specially useful for VMs, whether recovering a snapshot, or a VM with a misbehaving clock.

As a pertinent note, tinker panic 0 should be the first line of the configuration file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.