Linux NTP Server Date Time Force Sync/Update

Your ads will be inserted here by

Easy Plugin for AdSense.

Please go to the plugin admin page to
Paste your ad code OR
Suppress this ad slot.

You may also notice Ntp can’t update the time after a certain amount of time, even after restarting the service. How can we force it to sync the time?

On Centos/Linux:

open file /etc/sysconfig/ntp

and change
OPTIONS=”-u ntp:ntp -p /var/run/”
to be
OPTIONS=”-x -u ntp:ntp -p /var/run/”

That -x is a very tiny change, but a huge effect. What this does is when you stop/start ntp (or it starts on a reboot of your system), it does the equivelent of
ntpdate -u time.server.of.choice
ie, forcing the manual update against your chosen time server. No more manually fixing drift that has gotten too wide. From a reboot the time is set to a value that ntp then can automatically update and keep updated moving forward.

Try running
service ntpd restart
and you’ll see it do the manual time update.


Read More