Time sync with NTP server

A simple time lag on a remote server could be the root-cause of many issues ranging from missing logs to data inconsistencies. The following technique can help in syncing the server with the NTP server to reset the lag.

Check for NTP server that is referenced currently
root~# ntpq -p
remote refid st t when poll reach delay offset jitter
===========================================================
pool.ntp.org .INIT. 16 u - 1024 0 0.000 0.000 0.000
Compare current date on local machine vs NTP server
root~# rdate -n -p pool.ntp.org
Mon Jun 16 18:44:46 UTC 2014
root~# date
Mon Jun 16 18:25:03 UTC 2014
Update local machine Time (remove “-p” from rdate command)
root~# rdate -n pool.ntp.org
Mon Jun 16 18:45:35 UTC 2014
root~# date
Mon Jun 16 18:45:37 UTC 2014

No comments:

Post a Comment