>

NTP: Force Time Sync

From the command line:

# service ntpd stop
# ntpdate pool.ntp.org
# service ntpd start

On RHEL/CentOS you can force ntpd to syncronize on service startup by doing the following:

# vi /etc/sysconfig/ntpd

There is an OPTIONS variable with something like:

OPTIONS="-u ntp:ntp -p /var/run/ntpd.pid"

Add the -x parameter:

OPTION="-x -u ntp:ntp -p /var/run/ntpd.pid"

You may also want to set SYNC_HWCLOCK option to “yes”, in order to also syncronize hardware clock.

banner ad

Comments are closed.