我有下面的测试床
主
TQMLS1028A-IND
它只有硬件时间戳操作系统,
ID="poky"
NAME="Poky (Yocto Project Reference Distro)"
VERSION="3.0.4 (zeus)"
VERSION_ID="3.0.4"
PRETTY_NAME="Poky (Yocto Project Reference Distro) 3.0.4 (zeus)"它有ptp4l 2.0版本
从
PC机上只有软件时间戳操作系统:
NAME="Ubuntu"
VERSION="20.04.1 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.1 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal我正在使用这个命令作为主人
taskset -c 1 chrt 99 ptp4l -i eno1 -mq给奴隶的这个命令
sudo taskset -c 1 chrt 99 ptp4l -S -i enp3s0f1 -mq -s它为我提供了非常高的主偏移量、freq值和路径延迟值,它将进入MASTER_CLOCK_SELECTED上的状态MASTER_CLOCK_SELECTED从站,但只需几秒钟。它给出了以下错误
ptp4l[7632.725]: master offset 1611850007215613701 s2 freq +100000000 path delay 17013783
ptp4l[7633.625]: master offset 1611850007110097044 s2 freq +100000000 path delay 22519248
ptp4l[7634.525]: clockcheck: clock jumped forward or running faster than expected!
ptp4l[7634.525]: master offset 1611850010370484934 s0 freq +100000000 path delay 22519248
ptp4l[7634.525]: port 1: SLAVE to UNCALIBRATED on SYNCHRONIZATION_FAULT
ptp4l[7635.425]: master offset 1611850010270476347 s0 freq +100000000 path delay 22519248
ptp4l[7636.325]: master offset 1611850010167504974 s0 freq +100000000 path delay 25493617git的linuxptp存储库中有一些特定的配置文件,我尝试使用gPTP.cfg文件来配置ptpt4l,并使用Master命令
taskset -c 1 chrt 99 ptp4l -f gPTP.cfg -i eno1 -mq为奴隶
sudo taskset -c 1 chrt 99 ptp4l -S -f gPTP.cfg -i enp3s0f1 -mq -s但这是最糟糕的,因为从根本不尝试同步
ptp4l[8748.087]: selected local clock b82a72.fffe.9ac430 as best master
ptp4l[8751.360]: selected local clock b82a72.fffe.9ac430 as best master
ptp4l[8754.814]: selected local clock b82a72.fffe.9ac430 as best master我不确定问题是因为他们有不同的时间戳,或者是否有任何配置文件或参数,我必须给他们。
你能帮忙吗?
提前谢谢你
发布于 2021-02-03 12:19:25
这个问题是用下列方法解决的
中关闭NTP服务。
timedatectl set-ntp false
sudo systemctl stop systemd-timedated.service
sudo systemctl stop systemd-timesyncd?
phc2sys -c eno1 -O 0 -w -m -s CLOCK_REALTIME的ptp时钟同步。
phc2sys -s eno1 -m -w中打开ptp4l
ptp4l -i eno1 -mq -2中的ptp4l
ptp4l -S -i enp3s0f1 -mq -s -2在ptp4l中的选项2 (IEEE 802.3或以太网),它可以更改为-4 (UDP IPV4)或-6 (UDP IPV6)。
https://stackoverflow.com/questions/65949602
复制相似问题