Skip to content

Diagnosing NTP Synchronization Issues

Synchronization

For TCP/IPv6:

Use the following command to display the clock offset between the local system and the NTP server:

$ NTPQ -p

remote       refid          st t when poll reach delay  offset   jitter
========================================================================
*ntpserver   10.10.111.141   4 u  888 1024   377 0.977 -109.92   18.960

A negative offset indicates that the local system clock is behind the NTP server, whereas a positive offset indicates that the local system clock is ahead of the NTP server.

For TCP/IPv4:

Use the NTPTRACE command to compare the local clock to the server clock.

$ @SYS$MANAGER:TCPIP$DEFINE_COMMANDS.COM
$ NTPTRACE ntpserver
ntpserver: stratum 3, offset -8.521804, synch distance 5.79401
In this example, the server's stratum is set to 3. Offset shows a negative number, therefore, the server is requesting to subtract 8.521804 seconds from the clock.

If the difference between the local and the server's time is greater than 1000 seconds, NTP will fail to synchronize the clock with the server.

This can be seen in the TCPIP$NTP.LOG:

time error 7214.419784 is way too large (set clock manually)

This indicates that the clock is off by 7214 seconds.

Verify Time Zone Offset

If synchronization fails due to a large time difference, verify that SYS$TIMEZONE_DIFFERENTIAL is set correctly:

$ SHOW LOGICAL SYS$TIMEZONE_DIFFERENTIAL
"SYS$TIMEZONE_DIFFERENTIAL" = "-25200" (LNM$SYSTEM_TABLE)

Manually Synchronize the Clock

After verifying that the time zone offset is correct, manually synchronize the local system clock using the following commands:

For TCP/IPv6 use:

$ @SYS$MANAGER:TCPIP$NTP_SHUTDOWN.COM
$ NTPD :== $TCPIP$NTP
$ NTPD "-G" -q
$ @SYS$MANAGER:TCPIP$NTP_STARTUP.COM

For TCP/IPv4 use:

$ @SYS$MANAGER:TCPIP$NTP_SHUTDOWN.COM
$ NTPDATE server_ip_addr
$ @SYS$MANAGER:TCPIP$NTP_STARTUP.COM

Note

NTPDATE fails if TCPIP$NTP is already running or UDP port 123 is in use.

Stratum Values

NTP can synchronize only with servers that have a stratum value below 15. If the selected NTP server has a stratum of 15 or higher, synchronization will fail. A client with a stratum of 16 or greater is considered unsynchronized.

Run NTP Interactively

Log messages may take several minutes to appear in TCPIP$NTP.LOG. For immediate feedback, run NTP interactively and view messages directly on the terminal:

$ @SYS$MANAGER:TCPIP$NTP_SHUTDOWN.COM
$ RUN SYS$SYSTEM:TCPIP$NTP.EXE