Re: [Linuxptp-users] phc2sys doesn't sync RTC, UTC - TAI Difference
PTP IEEE 1588 stack for Linux
Brought to you by:
rcochran
From: <ds...@gm...> - 2016-06-08 13:35:02
|
<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div style="font-family: Verdana;font-size: 12.0px;"> <div> <div style="font-family: Verdana;font-size: 12.0px;"> <div> <div>Hi Richard,</div> <div> </div> <div>thanks for your help!</div> <div> </div> <div>>> The ptp hardware clock seems to be adjusted correct but with phc2sys i can't<br/> >> set the RTC on the same value as the PHC. It is 36 seconds away like TAI-UTC.<br/> ><br/> >The RTC should *not* have the same value as the PHC. The RTC uses the<br/> >UTC timescale, but the PHC uses TAI.<br/> ><br/> >BTW, your nodes all have TAI-UTC = 35, not the current 36. (This<br/> >shows that you are using some version prior to 1.6.) If you want to<br/> >have the correct offset, use the "set GRANDMASTER_SETTINGS_NP" pmc<br/> >command.<br/> ></div> <div> </div> <div>Thanks for the hint, i have seen the master is old with 1.4 and the slaves have the new version</div> <div>with 1.6</div> <div><br/> >> Master:<br/> >> ptp4l -2 -i eth0 -p /dev/ptp0 -m<br/> >> phc2sys -s eth0 -c CLOCK_REALTIME -w -m<br/> >> RTC: Wed Jun 8 10:34:27 2016 0.000000 seconds<br/> >> PHC: 2016-06-08 10:35:02.316598760<br/> ><br/> >On the master, you are adjusting your CLOCK_REALTIME to follow the PHC<br/> >time. But what is setting the PHC time? Maybe you reversed the -s<br/> >and -c flags, but I don't know your intention.<br/> ></div> <div> </div> <div>I use on the slave side the ptp timestamp with high accuracy for logging data,</div> <div>parallel i want to capture some wireshark frames with tcpdump.</div> <div>tcpdump uses the RTC so i'm not able to see directly the associated</div> <div>timestamps of PTP and RTC.</div> <div>This is the reason why i want to have the same time at PHC and RTC.</div> <div> </div> <div>Is this possible?</div> <div><br/> >> Slave1:<br/> >> ptp4l -i eth0 -p /dev/ptp0 -f /etc/linuxptp/default.cfg -s -m<br/> >> phc2sys -s eth0 -c CLOCK_REALTIME -w -q -m<br/> >> RTC: Wed Jun 8 10:34:25 2016 0.000000 seconds<br/> >> PHC: 2016-06-08 10:35:00.084961211<br/> ><br/> >> Slave2:<br/> >> ptp4l -i eth0 -p /dev/ptp0 -f /etc/linuxptp/default.cfg -s -m<br/> >> phc2sys -s eth0 -c CLOCK_REALTIME -w -q -m<br/> >> RTC: Wed Jun 8 10:34:29 2016 0.000000 seconds<br/> >> PHC: 2016-06-08 10:35:04.220653446<br/> ><br/> >> What am I doing wrong?<br/> ><br/> >The slaves are configured to adjust their CLOCK_REALTIME (UTC) to<br/> >follow the PHC (TAI). The master gives the slaves the TAI time and<br/> >tells them that TAI-UTC=35. Then, phc2sys sets the system clock, and<br/> >you can see the 35 second offset.<br/> ><br/> >So, there is nothing wrong with the slaves.<br/> ><br/> >HTH,</div> <div> </div> <div>DSP</div> </div> </div> </div> <div> </div> <div class="signature"> </div> </div></div></body></html> |