Clock configuration for time synchronization

In this procedure you will log in to the clock with PuTTY to verify the configuration for time synchronization.

To verify your clock configuration:

  1. Log in to the clock with PuTTY. See Using PuTTY.
  2. Execute the following command to ensure that the NTP process is running on the clock:
    
    root@ATS04d5e7:~# ps -ef | grep 
    ntpd
    ntp        965     1  0 17:28 ?        
    00:00:00 /usr/sbin/ntpd -u ntp:ntp -p /var/run/ntpd.pid -g
    root      1170  1154  0 17:29 pts/0    
    00:00:00 grep ntpd
    root@ATS04d5e7:~#

    If the ntpd process is not running as shown above, reboot the clock. Once the reboot is complete, repeat step 2 to see if the process is running. If the process is now running but the time on the clock remains incorrect proceed to step 3.

  3. Execute the following commands to ensure that the correct time server is configured in the ntp.conf file:
    
    root@ATS04d5e7:/etc/default# cat /etc/ntp.conf
    # Permit time synchronization with our time source, but do not
    # permit the source to query or modify the service on this system.
    restrict default kod nomodify notrap nopeer noquery
    
    # Permit all access over the loopback interface.  This could
    # be tightened as well, but to do so would effect some of
    # the administrative functions.
    restrict 127.0.0.1
    
    # Undisciplined Local Clock. This is a fake driver intended for backup
    # and when no outside source of synchronized time is available.
    server 127.127.1.0
    fudge   127.127.1.0 stratum 14
    
    # Drift file.  Put this in a directory which the daemon can write to.
    # No symbolic links allowed, either, since the daemon updates the file
    # by creating a temporary in the same directory and then rename()'ing
    # it to the file.
    driftfile /var/lib/ntp/drift
    
    #~~~~~ [AW] the following require further investigation ~~~~~#
    
    # IPV6 notation not working
    #restrict -6 ::1
    
    # Key file containing the keys and key identifiers used when operating
    # with symmetric key cryptography.
    #keys /etc/ntp/keys
    
    #~~~~~ [AW] the following are NTP servers configured via clock setup ~~~~~#
    server time.nist.gov
    server pool.ntp.org
    server 129.6.15.28
    root@ATS04d5e7:/etc/default#

    Confirm that the lines after #~~~~~ [AW] the following are NTP servers configured via clock setup ~~~~~# in the commands above represent the time servers your organization would like the clocks to synchronize with.

  4. If the time server is incorrect in either of the files in step 3, use the vi editor to correct the entry.
  5. To verify if the time server you have configured is correct execute the following commands:
    
    root@ATS04d5e7:/etc/default# ntpdate -v pool.ntp.org
    24 Sep 17:23:00 ntpdate[10162]: ntpdate 4.2.8p10@1.3728-o Tue Aug 28 02:27:22 UTC 2018 (2)
    24 Sep 17:23:11 ntpdate[10162]: adjust time server 158.69.226.90 offset -0.029522 sec
    root@ATS04d5e7:/etc/default#

    If the result returns the word offset and a time then everything is configured correctly. Check or update the files above with the address supplied for this command. Then reboot the clock and the time will be in synch.

    If the result returns an error message which does NOT include the word offset then the clock cannot reach the time server provided. Consult with your system administrator to verify that the correct time server is being utilized.

    If the changes required in step 4 or step 5 had to be performed, reboot the clock to restart the ntpd process. Once the reboot is complete verify if the time is now correct. If the time remains incorrect proceed to step 6.

  6. NTP requires port UDP 123 to be open and accessible to the clock so that the clock can communicate to the default public NTP time server pool.ntp.org. If traffic on this port is restricted then the clock will be unable to synchronize its time. Check with your network administrator to ensure that this port is open.

    If the time server configured is an internal server then check with your system administrator to ensure that the server is available and that its time is correct.