Verify Status of Linux OS Time Synchronization

Updated May 26, 2021

Environment

Hardware

  • cRIO-9041
  • cRIO-9040
  • cRIO-9049
  • cRIO-9042
  • cRIO-9043
  • cRIO-9045
  • cRIO-9046
  • cRIO-9047
  • cRIO-9048
  • cRIO-9053
  • cRIO-9054
  • cRIO-9055
  • cRIO-9056
  • cRIO-9057
  • cRIO-9058

To perform Network Time Protocol (NTP) synchronization on NI Linux Real-Time Devices such as CompactRIO 904x/5x, Linux OS time synchronization must be disabled. This article will share with you on how to determine have you disable the Linux OS time synchronization successfully.

To determine have you disable the Linux OS time synchronization successfully, the following command need to be executed in compactRIO's shell:
  • If using the Linux RT Base System Image:
    • cat /var/lib/ni-timesync/tsm.json | grep "phc2sysEnable"
  • If using Legacy Installation:
    • cat /usr/local/natinst/share/TimeSync/tsm.json | grep "phc2sysEnable"
If you are unsure which software installation method you are using, you can run both command and determine your software installation method and status of Linux OS time synchronization based on its output.

Below are the response and its definition that you can get after execute each of the command:
  •  "phc2sysEnable": true
    • Linux OS time synchronization is enabled
  • "phc2sysEnable": false
    • Linux OS time synchronization is disabled
  • No such file or directory
    • You are not using this software installation method. Please try the other command mentioned above.

Additional Information

You can only sever the link between network time and Linux OS time and set the Linux OS time arbitrarily by using NI-Sync 20.1.