How to Sync Time Server Manaully

  • by
After starting the server, I found that the date time a little bit deviated from the time server.
[root@primary01 ~]# ntpq -p
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
 venus.stu.edu.t 133.100.8.2      2 u    1   64    1  108.968  1894.81   0.000
 123-204-45-116. 211.22.103.158   3 u    1   64    1  113.820  1892.53   0.000
 sun.stu.edu.tw  133.100.10.8     2 u    1   64    1  103.523  1888.31   0.000
 x2204.ipv9.xyz  .INIT.          16 u    -   64    0    0.000    0.000   0.000
 ntp.nic.kz      .INIT.          16 u    -   64    0    0.000    0.000   0.000

If you can't wait ntpd to synchronize the date time with the preferred time server progressively, you can do it manually.
[root@primary01 ~]# service ntpd stop
Shutting down ntpd:                                        [  OK  ]
[root@primary01 ~]# ntpdate 1.tw.pool.ntp.org
13 Aug 15:24:25 ntpdate[13550]: adjust time server 120.119.31.1 offset -0.006948 sec
[root@primary01 ~]# service ntpd start
Starting ntpd:                                             [  OK  ]

Let' see the current estimations.
[root@primary01 ~]# ntpq -p
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
 123-204-45-116. 211.22.103.158   3 u    4   64    1   87.484   11.303   0.000
 venus.stu.edu.t 133.100.8.2      2 u    3   64    1   86.702   21.143   0.000
 sun.stu.edu.tw  133.100.10.8     2 u    2   64    1  110.828    4.304   0.000
 x2204.ipv9.xyz  .INIT.          16 u    -   64    0    0.000    0.000   0.000
 112.220.115.166 220.73.49.52     3 u    -   64    1  146.758   15.645   0.000

It's lots better in figures.

If you usually have trouble in date time when every time server boots. I suggest that you may add the commands to rc.local.
[root@primary01 ~]# chkconfig ntpd off
[root@primary01 ~]# vi /etc/rc.d/rc.local
...
ntpdate 1.tw.pool.ntp.org
service ntpd start

Leave a Reply

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