Developer Guide

  • 2022.1
  • 09/08/2022
  • Public
Contents

Time Synchronization Quality Check Between Boards

This demo uses two additional programs,
ptp4l
and
phc2sys
, which help with time synchronization between boards over the network and on boards between the Precision Time Protocol (PTP) hardware clock and the system clock. Time synchronization starts automatically during demo execution. It is possible to restart time synchronization without other demo execution steps. For details, see the execution modes (clock) in Command-Line Options.
Each time-synchronization application,
ptp4l
and
phc2sys
, has its own log file:
  • /var/log/ptp4l.log
    for
    ptp4l
  • /var/log/phc2sys.log
    for
    phc2sys
These files can be opened by file-reading tools such as
cat
,
tail
, or
less
. For example, to view the
ptp4l
log file, you can use the command:
cat /var/log/ptp4l.log
.
You can also list log-file data directly during runtime to check the quality of time synchronization. Use the
tail
tool with
--follow
to view new log entries during runtime. For example, use the command:
tail --follow /var/log/ptp4l.log
.
To check the time offset between primary and secondary clocks, use the
ptp4l
tool.
To check the offset between the PTP hardware clock and the system clock, use the
phc2sys
tool.
To check synchronization quality, open the corresponding log file using one of methods described above to see the following data:
  • Offset (in nanoseconds)
  • Frequency offset (in parts per billion, ppb)
  • Path delay (in nanoseconds)
The most important value is the offset in nanoseconds. For
ptp4l
, the tool shows the time offset between the primary and secondary clocks in nanoseconds. For
phc2sys
, the tool shows the time offset between the PTP hardware clock and the system clock. Generally, values less than 100 nanoseconds are an indicator of good time synchronization, but these values may vary and depend on hardware components. In this demo, a value less than 1 microsecond is acceptable.

Product and Performance Information

1

Performance varies by use, configuration and other factors. Learn more at www.Intel.com/PerformanceIndex.