Hi,

I'm not exactly sure what this tool is doing, but most likely explanation for 
the difference between those clocks is due to leap second offset (currently 37 
seconds).

I believe RT should be UTC, and the PHC should be TAI (37 seconds in front of 
TAI). phc2sys should add the offset (either from config or from the announce 
message).

Have you configured that?

Regards
Dennis

-----Original Message-----
From: Elder Costa <elder.co...@timpelmedical.com> 
Sent: Wednesday, May 24, 2023 1:20 PM
To: linuxptp-users@lists.sourceforge.net
Subject: [Linuxptp-users] Offset between TAI and PHC

I am getting the result below with the check_clocks utility.
downloaded from:
https://tsn.readthedocs.io/timesync.html#checking-clocks-synchronization

cve@cve-sbc-flt2:~/work$ sudo ./check_clocks -d enp3s0 -v
Dumping timestamps and deltas

rt tstamp: 1684764184805696608
tai tstamp: 1684764184805696893
phc tstamp: 1684764221805735928
rt latency: 136
tai latency: 120
phc latency: 7472
phc-rt delta: 37000039320
phc-tai delta: 37000039035

phc-tai delta is greater than 50 usec !
TAI offset set in kernel is not correct !
PTP peer port state and/or offset are messed up !
Please verify ptp4l and phc config and restart them if necessary to
synchronize the clocks !


I am running ptp4l and phc2sys to keep the system clocks of the master and slave
synchronized. Commands and configurations below.

What am I missing?


# Sincronize master's PTP with system clock (HW timestamp)
sudo phc2sys -c enp3s0 -s CLOCK_REALTIME -q -m -w --step_threshold=0.001

# Sincronize slave's system clock with PTP (HW timestamp)
sudo phc2sys -s enp3s0 -c CLOCK_REALTIME -q -m -w --step_threshold=0.001


# Test configuration of the Fitlet acting as a master
[global]
serverOnly              1
BMCA                    noop
use_syslog              0
verbose                 1

[enp3s0]


# Test configuration of the Fitlet acting as a master
[global]
clientOnly              1
BMCA                    noop
step_threshold          0.001
use_syslog              0
verbose                 1

[enp3s0]


_______________________________________________
Linuxptp-users mailing list
Linuxptp-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-users


_______________________________________________
Linuxptp-users mailing list
Linuxptp-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-users

Reply via email to