I met an issue is slave system time is not same as master system time when 
linuxptp and phc2sys are running, I think it is related to currentUtcOffset 
value.

Test environment is included three PCs(linux OS), one is master and two are 
slave.
Before run linuxptp, I use “date –s“ command to set these three PC’s system 
time to be the same.

First step, run linuxptp. When running linuxptp, the default currentUtcOffset 
value is 36 on master.
Below show the command as master and slave
Master:
ptp4l -i enp1s0f0 -m -H
ptp4l -i enp1s0f1 -m -H

enp1s0f0 and enp1s0f1 on the same NIC card

Slave 1:
ptp4l -i enp1s0f0 -m -H -s

Slave 2:
ptp4l -i enp1s0f0 -m -H -s

Second step, when linuxptp is locked, I am running phc2sys with following 
configuration on slave:
phc2sys -s enp1s0f0 -c CLOCK_REALTIME -w

Then, I compare the date between master and slave with the command “date”. I 
found that the time of two slaves is different from master.
If I want to correct it, I have to set currentUtcOffset to -25 (pmc –u –b 0 
“set GRANDMASTER_SETTINGS_NP) on master first, and run linuxptp and phc2sys on 
slave 1.
Then set currentUtcOffset to -5 on master, and run linuxptp and phc2sys on 
slave 2.

Why I need to set two different currentUtcOffset values? Is there has any 
method that I don’t need to set currentUtcOffset value every time when running 
linuxptp?
Is the command “phc2sys -s enp1s0f0 -c CLOCK_REALTIME -w”(set on slave) is 
correct if I want to sync the system time of master and slave?

Thanks
Van Yu


This e-mail and its attachment may contain information that is confidential or 
privileged, and are solely for the use of the individual to whom this e-mail is 
addressed. If you are not the intended recipient or have received it 
accidentally, please immediately notify the sender by reply e-mail and destroy 
all copies of this email and its attachment. Please be advised that any 
unauthorized use, disclosure, distribution or copying of this email or its 
attachment is strictly prohibited.

本電子郵件及其附件可能含有機密或依法受特殊管制之資訊,僅供本電子郵件之受文者使用。台端如非本電子郵件之受文者或誤收本電子郵件,請立即回覆郵件通知寄件人,並銷毀本電子郵件之所有複本及附件。任何未經授權而使用、揭露、散佈或複製本電子郵件或其附件之行為,皆嚴格禁止
 。

_______________________________________________
Linuxptp-users mailing list
Linuxptp-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-users

Reply via email to