[chrony-users] Re: Question about large gap of offset on phc2sys with chrony

[ Thread Index | Date Index | More chrony.tuxfamily.org/chrony-users Archives ]


+ chrony-users@xxxxxxxxxxxxxxxxxxxx

On Fri, Aug 5, 2022 at 11:14 AM 심준영 <joonyoung.shim@xxxxxxxx> wrote:
Hi all,

I have a problem on my system environment using chrony and linuxptp.

There are two machines on my local network. One is ptp4l master and another is
ptp4l slave. The ptp4l master machine uses chrony to update system clock and
also phc2sys updates PTP hardware clock from system clock.

The ptp4l slave machine doesn't use chrony and any NTP daemon, it updates
system clock using phc2sys from PTP hardware clock.

My problem is to cause too large gap between system clock and PTP hardware clock
for a short while, whenever chrony synchronizes time from external NTP server
(Poll is 6, so about 64 seconds) and then will affect to PTP hardware clock and
system clock of the ptp4l slave machine.

Are there any ideas to keep stable small gap even though using NTP like chrony
to update system clock?

Below is a phc2sys log from ptp4l master machine. The offset increases to
-2136ns from under 100ns when chrony synchronizes time from external NTP server.

...
Aug  5 10:54:56 my-machine phc2sys: [9332.901] eth0 sys offset       -39 s2 freq  -73487 delay   2250
Aug  5 10:54:57 my-machine phc2sys: [9333.901] eth0 sys offset       -53 s2 freq  -73512 delay   1875
Aug  5 10:54:58 my-machine phc2sys: [9334.902] eth0 sys offset       -15 s2 freq  -73490 delay   2250
Aug  5 10:54:59 my-machine phc2sys: [9335.902] eth0 sys offset        76 s2 freq  -73404 delay   1750
Aug  5 10:55:00 my-machine phc2sys: [9336.902] eth0 sys offset       -11 s2 freq  -73468 delay   1875
Aug  5 10:55:01 my-machine phc2sys: [9337.903] eth0 sys offset        29 s2 freq  -73431 delay   2000
Aug  5 10:55:02 my-machine phc2sys: [9338.903] eth0 sys offset       -38 s2 freq  -73489 delay   1875
Aug  5 10:55:03 my-machine phc2sys: [9339.903] eth0 sys offset         4 s2 freq  -73459 delay   2000
Aug  5 10:55:04 my-machine phc2sys: [9340.904] eth0 sys offset        17 s2 freq  -73445 delay   2000
Aug  5 10:55:05 my-machine phc2sys: [9341.904] eth0 sys offset       -15 s2 freq  -73472 delay   2000
Aug  5 10:55:06 my-machine phc2sys: [9342.904] eth0 sys offset         0 s2 freq  -73461 delay   2000
Aug  5 10:55:07 my-machine phc2sys: [9343.905] eth0 sys offset        16 s2 freq  -73445 delay   1875
Aug  5 10:55:08 my-machine phc2sys: [9344.905] eth0 sys offset       -23 s2 freq  -73479 delay   2000
Aug  5 10:55:09 my-machine phc2sys: [9345.905] eth0 sys offset         2 s2 freq  -73461 delay   2000
Aug  5 10:55:10 my-machine phc2sys: [9346.906] eth0 sys offset        33 s2 freq  -73430 delay   1751
Aug  5 10:55:11 my-machine phc2sys: [9347.906] eth0 sys offset       -62 s2 freq  -73515 delay   2125
Aug  5 10:55:12 my-machine phc2sys: [9348.906] eth0 sys offset         8 s2 freq  -73463 delay   2000
Aug  5 10:55:13 my-machine phc2sys: [9349.907] eth0 sys offset     -2136 s2 freq  -75605 delay   2000
Aug  5 10:55:14 my-machine phc2sys: [9350.907] eth0 sys offset     -2363 s2 freq  -76473 delay   1875
Aug  5 10:55:15 my-machine phc2sys: [9351.907] eth0 sys offset     -1656 s2 freq  -76475 delay   1875
Aug  5 10:55:16 my-machine phc2sys: [9352.908] eth0 sys offset      -919 s2 freq  -76234 delay   2000
Aug  5 10:55:17 my-machine phc2sys: [9353.908] eth0 sys offset      -571 s2 freq  -76162 delay   1875
Aug  5 10:55:18 my-machine phc2sys: [9354.908] eth0 sys offset      -176 s2 freq  -75938 delay   1875
Aug  5 10:55:19 my-machine phc2sys: [9355.909] eth0 sys offset         8 s2 freq  -75807 delay   2000
Aug  5 10:55:20 my-machine phc2sys: [9356.909] eth0 sys offset       -71 s2 freq  -75884 delay   2000
Aug  5 10:55:21 my-machine phc2sys: [9357.909] eth0 sys offset       119 s2 freq  -75715 delay   1750
Aug  5 10:55:22 my-machine phc2sys: [9358.910] eth0 sys offset       -49 s2 freq  -75847 delay   2000
Aug  5 10:55:23 my-machine phc2sys: [9359.910] eth0 sys offset        53 s2 freq  -75760 delay   2250
Aug  5 10:55:24 my-machine phc2sys: [9360.911] eth0 sys offset       -22 s2 freq  -75819 delay   2000
Aug  5 10:55:25 my-machine phc2sys: [9361.911] eth0 sys offset        25 s2 freq  -75779 delay   2000
Aug  5 10:55:26 my-machine phc2sys: [9362.912] eth0 sys offset        46 s2 freq  -75750 delay   2000
Aug  5 10:55:27 my-machine phc2sys: [9363.912] eth0 sys offset       -17 s2 freq  -75799 delay   2000
Aug  5 10:55:28 my-machine phc2sys: [9364.912] eth0 sys offset       -44 s2 freq  -75832 delay   2000
Aug  5 10:55:29 my-machine phc2sys: [9365.913] eth0 sys offset       -38 s2 freq  -75839 delay   2000
Aug  5 10:55:30 my-machine phc2sys: [9366.913] eth0 sys offset        53 s2 freq  -75759 delay   2000
Aug  5 10:55:31 my-machine phc2sys: [9367.913] eth0 sys offset       -30 s2 freq  -75826 delay   1875
Aug  5 10:55:32 my-machine phc2sys: [9368.914] eth0 sys offset       -36 s2 freq  -75841 delay   2001
....

Thanks.


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/