Thread: [Linuxptp-users] Offset between TAI and PHC
PTP IEEE 1588 stack for Linux
Brought to you by:
rcochran
From: Elder C. <eld...@ti...> - 2023-05-24 11:27:59
|
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] |
From: Dennis H. (dehagart) <deh...@ci...> - 2023-05-24 13:29:10
|
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 <eld...@ti...> Sent: Wednesday, May 24, 2023 1:20 PM To: lin...@li... 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 Lin...@li... https://lists.sourceforge.net/lists/listinfo/linuxptp-users |
From: Elder C. <eld...@ti...> - 2023-05-24 13:41:18
|
Hello, Dennys, thank you for chiming in. >From my understanding of the documentation, I assumed the offset would be taken from ptp4l with the '-w' command argument. Obviously I am missing some config or doing something wrong I am not figuring out. I tried some variations but either they desynchronized the system clocks by the offset (37s) or changed the deltas from positive to negative, still around 37 seconds. Em qua., 24 de mai. de 2023 às 10:13, Dennis Hagarty (dehagart) <deh...@ci...> escreveu: > > 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 <eld...@ti...> > Sent: Wednesday, May 24, 2023 1:20 PM > To: lin...@li... > 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 > Lin...@li... > https://lists.sourceforge.net/lists/listinfo/linuxptp-users |
From: Miroslav L. <mli...@re...> - 2023-05-24 13:50:58
|
On Wed, May 24, 2023 at 08:19:37AM -0300, Elder Costa wrote: > 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 ! I think you need to set currentUtcOffsetValid and timeTraceable on the GM with a pmc SET GRANDMASTER_SETTINGS_NP command for the client's phc2sys to actually set the TAI-UTC offset of the system clock. -- Miroslav Lichvar |
From: Dennis H. (dehagart) <deh...@ci...> - 2023-05-24 18:05:56
|
Hi, Yes, I think so. The GM will send those values in the Announce message and you pick it up with -w If it's not, you can configure the offset locally on the client end with -O Regards Dennis -----Original Message----- From: Miroslav Lichvar <mli...@re...> Sent: Wednesday, May 24, 2023 3:51 PM To: Elder Costa <eld...@ti...> Cc: lin...@li... Subject: Re: [Linuxptp-users] Offset between TAI and PHC On Wed, May 24, 2023 at 08:19:37AM -0300, Elder Costa wrote: > 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 ! I think you need to set currentUtcOffsetValid and timeTraceable on the GM with a pmc SET GRANDMASTER_SETTINGS_NP command for the client's phc2sys to actually set the TAI-UTC offset of the system clock. -- Miroslav Lichvar _______________________________________________ Linuxptp-users mailing list Lin...@li... https://lists.sourceforge.net/lists/listinfo/linuxptp-users |
From: Elder C. <eld...@ti...> - 2023-05-24 20:09:52
|
Hello Dennys, Miroslav. I will try your suggestions. Thank you both for the help BR. Em qua., 24 de mai. de 2023 às 14:50, Dennis Hagarty (dehagart) <deh...@ci...> escreveu: > > Hi, > > Yes, I think so. > > The GM will send those values in the Announce message and you pick it up with -w > If it's not, you can configure the offset locally on the client end with -O > > Regards > Dennis > > -----Original Message----- > From: Miroslav Lichvar <mli...@re...> > Sent: Wednesday, May 24, 2023 3:51 PM > To: Elder Costa <eld...@ti...> > Cc: lin...@li... > Subject: Re: [Linuxptp-users] Offset between TAI and PHC > > On Wed, May 24, 2023 at 08:19:37AM -0300, Elder Costa wrote: > > 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 ! > > I think you need to set currentUtcOffsetValid and timeTraceable on the > GM with a pmc SET GRANDMASTER_SETTINGS_NP command for the client's > phc2sys to actually set the TAI-UTC offset of the system clock. > > -- > Miroslav Lichvar > > > > _______________________________________________ > Linuxptp-users mailing list > Lin...@li... > https://lists.sourceforge.net/lists/listinfo/linuxptp-users |