Linux ptp4l主偏移、频率和路径延迟的高值
我有下面的试验台 掌握 TQMLS1028A-IND 它只有硬件时间戳 操作系统Linux ptp4l主偏移、频率和路径延迟的高值,linux,ubuntu,yocto,clock,ptp,Linux,Ubuntu,Yocto,Clock,Ptp,我有下面的试验台 掌握 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)&quo
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
从机
个人电脑
它只有软件时间戳
操作系统:
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
它给我提供了非常高的主偏移量、频率和路径延迟值,它会进入主时钟上的s2从状态,但只持续几秒钟。它给出了以下错误
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 25493617
git的linuxptp存储库中有某些配置文件,我尝试使用gPTP.cfg文件toc配置ptpt4l,并使用以下命令
为了主人
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
我不确定问题是否是因为他们有不同的时间戳,或者是否有任何配置文件或参数我必须给他们
你能帮忙吗
提前感谢此问题通过以下方式解决
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
phc2sys -s eno1 -m -w
ptp4l -i eno1 -mq -2
ptp4l -S -i enp3s0f1 -mq -s -2