Verifying NTP Synchronization on NI Linux Real-Time Targets

Updated Apr 3, 2025

Environment

Hardware

  • CompactRIO Controller

Driver

  • NI CompactRIO

Operating System

  • NI Linux Real-Time

I set Network Time Protocol (NTP) on my NI Linux Real-Time (RT) target to synchronize system time following this link:

RT target system time looks quite the same as the NTP server:

  • Is there a way to monitor NTP connection status?
  • How can I confirm that the RT target is synchronized with my NTP server?

To monitor NTP connection in your RT target you have to access it through a SSH session.

And run the command below:

  • ntpq -p

The command output will show the billboard of NTP servers connected with the RT target. You can see the list of NTP server's name or IP address that you configured in /etc/ntp.conf file in the RT target.

 

The following table shows the description of symbols in front of the server's name that indicates the connection status.

 

 Indicator 

Status

Description

 reject“LOCAL clock” for this localhost or the peer is discarded as unreachable, synchronized to this server or outrageous synchronization distance.
x falsetick Out of tolerance, do not use (discarded by intersection algorithm)
outlyerOut of tolerance, do not use (discarded by the algorithm of cluster)
#selectedGood remote peer or server but not utilized (not among the first six peers sorted by synchronization distance, ready as a backup source)
+candidatGood and a preferred remote peer or server (included by the combine algorithm)
*sys.peerThe remote peer or server presently used as the primary reference

 

If there is "*" symbol in front of the server like in the capture bellow, your RT target is synchronized with the time server.

  • When the RT target is not connected to a server, you will see a blank symbol at the left of the server's name and the st (stratum) field value will be 16.



Additional Information

If the symbol is still blank and the value of st (stratum) field is still 16, then you can try the following:

  • Ensure that your /etc/ntp.conf file in host time server is set up properly. You have to check whether the host server restricts client access or not. For example, the configuration file in the host server should include the following line to allow access of the client:
    • restrict <Client IP address> mask 255.255.255.0 nomodify notrap
    • If you use Meinberg NTP Software in host PC, you can find this file at the location below:
  • After editing and saving /etc/ntp.conf file, you have to restart daemon to update that configuration.
    • After restarting the RT target or restart NTP daemon by commanding /etc/init.d/ntpd restart, it takes about 5 minutes to connect to NTP server. You will see the symbols change to "*", "+" etc and st (stratum) field values in a few minutes.
  • If NI-Sync is installed in the RT target, could disturb synchronization. Please ensure NI-Sync is not installed in your RT target.
  • Try to synchronize with other NTP servers, for example, public NTP server on the internet. There are several public servers service in your region.
  • TSN-enabled targets (such as cRIO-904X/905X targets) are not currently compatible with any type of synchronization besides IEEE-1588 (PTP) and 802.1AS synchronization. 

Was this information helpful?

Yes

No