Yes the bracket has the monotonic time. The time wasn't showing the same
because I rebooted it before getting the logs.. Please see now.
root@vshanmu:~# pmc -u -s /var/run/ptp4l-eth0-slave -b 0 "GET TIME_STATUS_NP"
sending: GET TIME_STATUS_NP
02f052.fffe.440233-0 seq 0 RESPONSE MANAGEMENT TIME_STATUS_NP
master_offset -34
ingress_time 316315893205115170
cumulativeScaledRateOffset +0.000000000
scaledLastGmPhaseChange 0
gmTimeBaseIndicator 0
lastGmPhaseChange 0x0000'0000000000000000.0000
gmPresent true
gmIdentity 02f052.fffe.440240
root@vshanmu:~# ./out
MONOTONIC:47244.423291425
REALTIME:316315897.62804846
TAI:316315897.62811430
Sleep 1sec
MONOTONIC:47245.423488082
REALTIME:316315898.62923039
TAI:316315898.62929194
Sleep 1sec
MONOTONIC:47246.423585463
REALTIME:316315899.63017930
TAI:316315899.63020838
Sleep 1sec
MONOTONIC:47247.423675860
REALTIME:316315900.63107994
TAI:316315900.63113771
Sleep 1sec
MONOTONIC:47248.423769407
REALTIME:316315901.63201428
TAI:316315901.63207012
Sleep 1sec
root@vshanmu:~# tail -f /var/log/ptp.log
ptp4l[47261.065]: master offset 132 s2 freq +18654 path delay 16104
phc2sys[47261.505]: CLOCK_REALTIME phc offset 138 s2 freq +18667 delay
1073
ptp4l[47262.090]: master offset 4772 s2 freq +23333 path delay 16104
phc2sys[47262.505]: CLOCK_REALTIME phc offset 2066 s2 freq +20636 delay
1068
ptp4l[47263.115]: master offset 3630 s2 freq +23623 path delay 16261
phc2sys[47263.505]: CLOCK_REALTIME phc offset 4872 s2 freq +24062 delay
1069
ptp4l[47264.140]: master offset -10701 s2 freq +10381 path delay 16261
phc2sys[47264.505]: CLOCK_REALTIME phc offset -402 s2 freq +20250 delay
1062
ptp4l[47265.165]: master offset -1963 s2 freq +15908 path delay 15798
phc2sys[47265.506]: CLOCK_REALTIME phc offset -8392 s2 freq +12139 delay
1072
ptp4l[47266.190]: master offset 4193 s2 freq +21476 path delay 15798
phc2sys[47266.506]: CLOCK_REALTIME phc offset -2873 s2 freq +15140 delay
1069
^C
root@vshanmu:~# ps -ef |grep ptp4l
698 root 0:09 ptp4l -i eth0 -f /usr/share/ptp4l/ptp4l-eth0-slave.conf -s
-m
699 root 0:03 phc2sys -s eth0 -z /var/run/ptp4l-eth0-slave -w -m
1191 root 0:00 grep ptp4l
root@cavs:~#
On Monday, 31 October, 2022 at 10:12:01 am GMT-4, Miroslav Lichvar
<[email protected]> wrote:
On Mon, Oct 31, 2022 at 02:00:28PM +0000, Nemo Crypto wrote:
> MONOTONIC:964.921879908
> REALTIME:316260827.761696659
> TAI:316260827.761702962
>
> During this time, at least, I was expecting that the phc2sys phc offset would
> show the jump in offset which is not the case..
> phc2sys[44.221]: CLOCK_REALTIME phc offset 909 s2 freq +17596 delay
> 1071
> ptp4l[44.283]: master offset 1156 s2 freq +18362 path delay 14498
> phc2sys[45.221]: CLOCK_REALTIME phc offset 1651 s2 freq +18610 delay
> 1041
> ptp4l[45.308]: master offset 766 s2 freq +18319 path delay 14498
> phc2sys[46.221]: CLOCK_REALTIME phc offset 1346 s2 freq +18801 delay
> 1069
> ptp4l[46.333]: master offset -305 s2 freq +17478 path delay 14498
> phc2sys[47.221]: CLOCK_REALTIME phc offset 123 s2 freq +1798
> Can you please help explaining this behavior?
The timestamps printed by ptp4l and phc2sys in brackets is the
monotonic time, which doesn't match the 964 above. Are you running the
commands on the same machine?
--
Miroslav Lichvar
_______________________________________________
Linuxptp-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linuxptp-users