Re: [chrony-users] PHC / NIC / PPS mismatch

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


It doesn't seem to be the 5.10 kernel alone.   I did a clean Debian 10
and made it work.  That's chrony 3.44 and Linux 4.19.0.

Then I used backports to install a 5.10.0 kernel.   Reboot.   It still works:

christopher@apu-42:~$ chronyc sources; echo; chronyc sourcestats;
echo; chronyc tracking
210 Number of sources = 6
MS Name/IP address         Stratum Poll Reach LastRx Last sample
===============================================================================
#? NMEA                          0   3   377     8    +92ms[  +92ms] +/- 1710us
#* PPS                           0   0   377     0    +16ns[  +19ns] +/-  121ns
^? 2600:3c01::f03c:91ff:feb>     0   6     0     -     +0ns[   +0ns] +/-    0ns
^x 12.167.151.1                  3   6   373    15   +114ms[ +114ms] +/-  100ms
^x 208.67.72.50                  2   6   377    14   +112ms[ +112ms] +/-   80ms
^x ns2.iu13.org                  2   6   377    13   +101ms[ +101ms] +/-   68ms

210 Number of sources = 6
Name/IP Address            NP  NR  Span  Frequency  Freq Skew  Offset  Std Dev
==============================================================================
NMEA                        6   4    41   +200.359    662.364    +97ms  1545us
PPS                         6   4     5     +0.004      0.012     +1ns     6ns
2600:3c01::f03c:91ff:feb>   0   0     0     +0.000   2000.000     +0ns  4000ms
12.167.151.1               14   7   716     -6.102      0.790   +114ms   177us
208.67.72.50               15   6   718     -6.428      0.824   +112ms   166us
ns2.iu13.org               15   7   719     -6.649      2.613   +101ms   555us

Reference ID    : 50505300 (PPS)
Stratum         : 1
Ref time (UTC)  : Thu Nov 18 03:29:14 2021
System time     : 0.000000008 seconds fast of NTP time
Last offset     : +0.000000013 seconds
RMS offset      : 0.000000006 seconds
Frequency       : 0.269 ppm slow
Residual freq   : +0.004 ppm
Skew            : 0.006 ppm
Root delay      : 0.000000001 seconds
Root dispersion : 0.000001043 seconds
Update interval : 1.0 seconds
Leap status     : Normal
christopher@apu-42:~$ cat /etc/chrony/chrony.conf
keyfile /etc/chrony/chrony.keys
driftfile /var/lib/chrony/chrony.drift
logdir /var/log/chrony

maxupdateskew 100.0
rtcsync
makestep 1 3

pool 2.debian.pool.ntp.org iburst


hwtimestamp enp1s0
refclock SHM 0 refid NMEA precision 1e-3 poll 3 offset 100e-3 noselect
refclock PHC /dev/ptp3:extpps,pin=0 refid PPS width 100e-3 poll 0 lock
NMEA trust
christopher@apu-42:~$ uname -a
Linux apu-42 5.10.0-0.bpo.9-amd64 #1 SMP Debian 5.10.70-1~bpo10+1
(2021-10-10) x86_64 GNU/Linux
christopher@apu-42:~$ dpkg -l chrony
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version       Architecture Description
+++-==============-=============-============-===========================================
ii  chrony         3.4-4+deb10u1 amd64        Versatile implementation
of the Network Tim
christopher@apu-42:~$




On Mon, Nov 15, 2021 at 7:57 PM Christopher Hoover <ch@xxxxxxxxxxxxxx> wrote:
>
> p.s. in all cases ntpshmon shows data:
>
> christopher@apu-42:~$ sudo ntpshmmon
> ntpshmmon: version 3.22
> #      Name  Seen@                 Clock                 Real                 L Prc
> sample NTP0  1637034947.292044404  1637034947.090644472  1637034947.000278692 0 -20
> sample NTP0  1637034948.110421061  1637034948.109557612  1637034948.000278696 0 -20
>
> (this is the deb 11 box that doesn't see PPS on the NIC at all.)
>
> -- Christopher.
>
>
>
> On Mon, Nov 15, 2021 at 7:44 PM Christopher Hoover <ch@xxxxxxxxxxxxxx> wrote:
>>
>> I upgraded the 4-nic box to Debian 11.
>>
>> kernel 5.10.0-9-amd64 #1 SMP Debian 5.10.70-1
>> chrony 4.0-8
>>
>> Using same config file that work under Debian 10, startup fails because of the comma in
>>
>> ---
>> refclock PHC /dev/ptp3:extpps,pin=0 refid PPS width 100e-3 precision 1e-9 poll 0 lock NMEA trust
>> ---
>>
>> Changing the comma do colon does not work (reflock PPS sees nothing).
>>
>> I dropped the "lock NMEA trust":
>>
>> ---
>> refclock PHC /dev/ptp3:extpps refid PPS width 100e-3 precision 1e-9 poll 0
>> ---
>>
>> no pin does not work (reflock PPS sees nothing)
>> :pin=0 does not work (reflock PPS sees nothing)
>> :pin=1 does not work (reflock PPS sees nothing)
>>
>> I suppose I can reinstall Debian 10 and roll the kernel to 5.x with backports.
>>
>> -- Christopher
>>
>>
>>
>>
>> On Mon, Nov 15, 2021 at 6:31 PM Christopher Hoover <ch@xxxxxxxxxxxxxx> wrote:
>>>
>>> This works on the 4 NIC board:
>>>
>>> ---
>>> refclock PHC /dev/ptp3:extpps,pin=0 refid PPS width 100e-3 precision 1e-9 poll 0 lock NMEA trust
>>> ---
>>>
>>> but without ",pin=0", it does not.
>>>
>>>
>>> On nearly identical hardware, difference being  3 NICs ( PPS wired to the 'last' NIC in both cases),  this works fine:
>>>
>>> ---
>>> refclock PHC /dev/ptp2:extpps refid PPS width 100e-3 precision 1e-9 poll 0 lock NMEA trust
>>> ---
>>>
>>> Same kernel (4.19.0-18-amd64 #1 SMP Debian 4.19.208-1).     Same chrony (3.4-4+deb10u1).
>>>
>>> I'll roll the kernel forward and chrony forward from Debian 10 to Debian 11 and report results.
>>>
>>> -- Christopher.
>>>
>>>
>>>
>>>
>>>
>>> On Mon, Nov 15, 2021 at 12:54 AM Miroslav Lichvar <mlichvar@xxxxxxxxxx> wrote:
>>>>
>>>> On Fri, Nov 12, 2021 at 05:28:56PM -0800, Christopher Hoover wrote:
>>>> > refclock SHM 0 refid NMEA precision 1e-3 poll 3 offset 100e-3 noselect
>>>> > refclock PHC /dev/ptp2:extpps refid PPS width 100e-3 precision 1e-9 lock
>>>> > NMEA poll 0 trust
>>>>
>>>> > If I look for PPS, I find it on ptp0/pps0 with Bullseye.
>>>>
>>>> > It is not found anywhere else.
>>>> >
>>>> > If tried telling chrony to /dev/ptp0 instead of /dev/ptp2, but it does NOT
>>>> > find the PPS.
>>>>
>>>> Does the SHM refclock work correctly? If it didn't, the PPS PHC
>>>> wouldn't report any samples. You could try removing the lock option
>>>> and add an NTP server to be sure.
>>>>
>>>> I don't remember any changes between chrony-3.4 and 4.0 that could
>>>> have an impact in this configuration.
>>>>
>>>> You could try adding ":pin=1" to the PHC refclock config, to see if
>>>> the newer kernel is numbering the pins differently, but I doubt it.
>>>>
>>>> If that doesn't help, run chronyd in strace for few seconds and post
>>>> the output here.
>>>>
>>>> --
>>>> Miroslav Lichvar
>>>>
>>>>
>>>> --
>>>> To unsubscribe email chrony-users-request@xxxxxxxxxxxxxxxxxxxx
>>>> with "unsubscribe" in the subject.
>>>> For help email chrony-users-request@xxxxxxxxxxxxxxxxxxxx
>>>> with "help" in the subject.
>>>> Trouble?  Email listmaster@xxxxxxxxxxxxxxxxxxxx.
>>>>

-- 
To unsubscribe email chrony-users-request@xxxxxxxxxxxxxxxxxxxx 
with "unsubscribe" in the subject.
For help email chrony-users-request@xxxxxxxxxxxxxxxxxxxx 
with "help" in the subject.
Trouble?  Email listmaster@xxxxxxxxxxxxxxxxxxxx.


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