参考文献:

http://linuxptp.sourceforge.net/

https://docs.fedoraproject.org/en-US/fedora/rawhide/system-administrators-guide/servers/Configuring_PTP_Using_ptp4l/

https://blog.csdn.net/fhxy_xzw/article/details/79303132

https://packages.ubuntu.com/xenial/s390x/linuxptp/filelist

1、安装linuxptp

sudo apt-get install linuxptp

2、下载linuxptp源码:

git clone git://git.code.sf.net/p/linuxptp/code linuxptp

cd linuxptp

cp configs/gPTP.cfg ./

vim gPTP.cfg

添加:

p2p_dst_mac01:1B:19:00:00:00

修改:

neighborPropDelayThresh80000

ptp_dst_mac01:1B:19:00:00:00

3、参考README配置:

sudo vim /usr/share/doc/linuxptp/README.Debian

1. Default configuration

The default configuration can be found in /etc/linuxptp/ptp4l.conf.

This is the default.cfg provided by the upstream source.

2. Systemd services

The service ptp4l invokes ptp4l on eth0 by default. To adjust the

parameters, follow these steps:

1. create a directory /etc/systemd/system/ptp4l.service.d

2. place a file with its name ending in .conf there

3. put these lines into the file, with the parameters adjusted to your needs:

[Service]

ExecStart=

ExecStart=/usr/sbin/ptp4l -f /etc/linuxptp/ptp4l.conf -i eth0

参考示例:

/home/amine/linuxptp/gPTP.cfg

#

# 802.1AS example configuration containing those attributes which

# differ from the defaults.  See the file, default.cfg, for the

# complete list of available options.

#

[global]

gmCapable        1

priority1        248

priority2        248

logAnnounceInterval    0

logSyncInterval        -3

syncReceiptTimeout    3

neighborPropDelayThresh    80000

min_neighbor_prop_delay    -20000000

assume_two_step        1

path_trace_enabled    1

follow_up_info        1

transportSpecific    0x1

ptp_dst_mac        01:1B:19:00:00:00

p2p_dst_mac        01:1B:19:00:00:00

network_transport    L2

delay_mechanism        P2P

/etc/systemd/system/ptp4l.service.d/gPTP.conf

[Service]

ExecStart=

ExecStart=/usr/sbin/ptp4l -2 -f /home/amine/linuxptp/gPTP.cfg -i eth0.10 -i eth0.20 -i eth0.30 -i eth0.40 -i eth0.50 -i eth0.60 -i eth0.70 -i eth0.80 eth0.90 -i eth0.100 -i eth0.110 -i eth0.120 -i eth0.130 -i eth0.140 -i eth0.150 -i eth0.160 -i eth0.170 -i eth0.180 -q -l 6 -S

特殊说明:

我配置的VLAN网卡比较多,导致ptp4l.service启动错误,我修改了

/lib/systemd/system/ptp4l.service

的 [Unit] 增加

After=network.target

[Unit]

Description=Precision Time Protocol (PTP) service

Documentation=man:ptp4l

After=network.target

linux 启动程序-p,Linux应用程序开发笔记:配置linuxptp开机启动(ubuntu gPTP)相关推荐

  1. linux教程:配置Tomcat开机启动

    我们在linux下安装好tomcat之后:经常是需要配置到开机启动的: 这样的话就不需要我们每次重启linux服务器之后自己在登陆运行startup.sh文件启动tomcat了 本次的演示环境是在ce ...

  2. CentOS7 配置Supervisor开机启动

    之前看过一篇文章写如何配置Supervisor开机启动,这里做一下记录 1. 在自己桌面新建一个supervisord.service文件 内容为: [Unit] Description=Superv ...

  3. CentOS7配置Supervisor开机启动

    参考地址: 配置Supervisor开机启动 配置Supervisor开机启动: 新建一个"supervisord.service"文件 dservice for systemd ...

  4. 解决问题:/etc/rc.local文件配置的开机启动项不生效

    解决问题:/etc/rc.local文件配置的开机启动项不生效 首先查看/etc/rc.local文件内容,寻找问题出现的原因. [root@localhost ~]# cat /etc/rc.loc ...

  5. springboot thymeleaf配置_【程序源代码】Spring Boot 开发笔记web开发实战1

    关键字:<Spring Boot 开发笔记>系列文章 各位亲爱的小伙伴:大家好! <Spring Boot 开发笔记>系列文章 这套笔记和源码是我自己在学习springboot ...

  6. Linux学习总结(35)——CentOS 7.X设置服务开机启动

    centos 7以上是用Systemd进行系统初始化的,Systemd 是 Linux 系统中最新的初始化系统(init),它主要的设计目标是克服 sysvinit 固有的缺点,提高系统的启动速度.关 ...

  7. linux教程:[4]配置Tomcat开机启动

    http://jingyan.baidu.com/article/6525d4b1382f0aac7d2e9421.html 方法/步骤 1 请自行下载安装配置tomcat的服务器环境 本经验仅仅介绍 ...

  8. eclipse java启动参数设置_[Java教程]eclipse.ini配置eclipse的启动参数

    [Java教程]eclipse.ini配置eclipse的启动参数 0 2013-09-28 01:00:11 Eclipse的启动由$ECLIPSE_HOME/eclipse.ini控制,如果$EC ...

  9. win7开机启动项设置_Win7系统电脑使用注册表查看开机启动项操作方法

    Win7电脑如何查看注册表启动项?我们都知道开机启动项可以用msconfig命令打开,那么除了msconfig命令之外还有什么方法可以查看开机启动项呢?我们还可以通过第三方工具来查看开机启动项,因为有 ...

最新文章

  1. djangorestframework源码分析1:generics中的view执行流程
  2. mockmvc get请求 tm的 一直404_面试:SpringMVC在接收到请求后的调用细节是什么?
  3. [bzoj2324][ZJOI2011]营救皮卡丘
  4. Oracle 11g R2的卸载与重装
  5. 合众朱光林:借O2O模式反馈企业才有价值
  6. 基于电商消费行为金融用户的数据梳理
  7. C++实验课任务(多态--容器--算法)
  8. MySQL8.0 - 新特性 - 临时表改进 1
  9. PHP set_error_handler() 函数
  10. Matlab 答题卡方案
  11. phython学习笔记1
  12. ckplayer-超酷网页视频播放器的使用
  13. 【2022】软著申请流程及注意事项分享一下
  14. 网络对抗技术 实验一
  15. 激光对射之智能变频技术
  16. 【iPhone】iPhone仅仅备份图片且保存实况图片(live photo)的方案
  17. 正则表达式30分钟入门
  18. Teamcenter中英文环境切换
  19. 猫 老鼠 人的编程题
  20. xampp php目录,htaccess文件,php,包括目录和Windows XAMPP配置噩梦

热门文章

  1. Condition.doSignal
  2. 为什么要用MyBatis-Hibernate
  3. 高仿真的类-BeanDefinitionReader
  4. 大型网站的架构演进从一个电商网站开始
  5. SpringCloud导学
  6. mysql的索引介绍_1
  7. 搭建卷积神经网络怎么确定参数_AI入门:卷积神经网络
  8. 微星z370黑苹果_记录一下装了第二台黑苹果(Z370 + High Sierra)
  9. 在 Java 中,如何批量读取本项目资源目录下的所有文件
  10. 【工具使用系列】关于 MATLAB 有限元分析,你需要知道的事