Blog

NTP out of sync? How to Sync time with NT in Unix & Linux | Metal Toad

Written by Metal Toad Staff | Jan 11, 2010 12:00:00 AM

Is your unix-based system time out of sync? If it is out of sync by more that 1000 seconds, you will need to manually force it back into sync. Try:

# ntpd -q

to force a re-sync with the ntp time servers specified in your NTP configuration file.

Two issues that may arise:

  1. Your ntp servers may need updating in your /etc/ntp.conf file (one of many NTP server lists).
  2. Check if you are being stymied by trying to update from behind a firewall.

Also, you can try using the deprecated ntpdate along with the regional host name that makes the most sense provided with the server name (see list above).

for example:
# ntpdate north-america.pool.ntp.org

And finally, use ntpq to check that your offset and jitter aren't too large (times are shown in milliseconds):

# ntpq -p

Check any of the above commands' man pages for an in-depth explanation of each one and it's possible options.