Force syncronize NTP to the NTP server on CentOS 6 /RHEL 6

Scenario: How to force syncronize NTP to the NTP server.
System: RHEL 6/ CentOS 6

Steps:
1. Stop the ntpd service :
# service ntpd stop

2. Force to sync
# ntpd -gq
-g = requests an update irrespective of the time offset
-q = requests the daemon to quit after updating the date from the ntp server.

3. Start the ntpd service :
# service ntpd start

[root@LXDTEST1 ~]# service ntpd restart
Shutting down ntpd: [ OK ]
Starting ntpd: [ OK ]
[root@LXDTEST1 ~]# service ntpd stop
Shutting down ntpd: [ OK ]
[root@LXDTEST1 ~]# ntpd -gq
ntpd: time slew -0.001174s
[root@LXDTEST1 ~]# service ntpd start
Starting ntpd: [ OK ]
[root@LXDTEST1 ~]#

Reference:
https://www.thegeekdiary.com/centos-rhel-6-how-to-force-a-ntp-sync-with-the-ntp-servers/


Leave a Reply

Your email address will not be published. Required fields are marked *