当前位置: 首页 > news >正文

营销型网站建设设计服务专业的深圳电商app开发

营销型网站建设设计服务,专业的深圳电商app开发,wordpress ss,低价网站建设费用多少Linux时间体系 Linux 需要提供“知道当前时间、计算时间长度、定时提醒”这三种功能。 其中知道当前时间和计算时间长度在某种程度上可以互相转换。即以UNIX Epoch计时开始可以知道当前时间。 一般硬件可以提供下列的硬件时钟#xff1a; RTC 【真实时钟】 对于PC而言 RTC 【真实时钟】 对于PC而言一般通过主板上的纽扣电池供电维护防止断电后时间信息不对。对于嵌入式设备我觉得一般没有使用这个时钟。RTC时钟一般需要通过IO接口读取进入Kernel然后更新内部的时间计数器然后在关机过程中写入。以保存时间。对于嵌入式设备我觉得可以靠NTP之类的授时协议来更新时钟。定时器【TImer】 这个一般是定时中断可能精度较低计时器【counter】 递增的CPU计数器 属于是寄存器。读取超级快。精度高准确。 下面是一些常用概念 UNIX Epoch UNIX诞生那一年作为类UNIX计时的起点即1970-01-01。 UTC 世界协调时间一般认为的0时区时间。计算机底层都是用UTC交互应用层上面再加逻辑换算时区。 Linux的时间接口会用到这些参数 timespec是一个结构体内有两个参数一个是秒一个是纳秒。表示精度到那纳秒。 clockid用于区分使用的不同时钟体系 【CLOCK_REALTIME】 自然时间也就是壁挂时钟。可设置可跳跃。可往前可往后。 会影响到这些时间体系CLOCK_REALTIME_ALARM定时专用/COARSE粗糙读取快/TAI无闰 这些不可设置。 【CLOCK_MONOTONIC】 单调递增时钟只能往后调整不能往前调。一般是以系统启动为起点。 【CLOCK_MONOTONIC_RAW】 不能调整。 linuxptp 查看网卡是否有ptp硬件时钟 sudo ethtool -T 网卡名 [ 如eth0 ] ptp4l ptp4l is an implementation of the Precision Time Protocol (PTP) according to IEEE standard 1588 for Linux. It implements Boundary Clock (BC), Ordinary Clock (OC), and Transparent Clock (TC). 选项 -H 使用硬件时钟 Select the hardware time stamping. All ports specified by the -i option and in the configuration file must be attached to the same PTP hardware clock (PHC). This is the default time stamping. -S 使用软件时钟 Select the software time stamping. -f config 指定配置文件 Read configuration from the specified file. No configuration file is read by default. -i interface 指定ptp硬件时钟 如果不指定好像会自动选择。一般一个网卡可能也就一个硬件ptp时钟 在/dev/ptp* 可以看到 Specify a PTP port, it may be used multiple times. At least one port must be specified by this option or in the configuration file. -s 纯纯slave模式 Enable the clientOnly mode. -m 标准输出端口打印log Print messages to the standard output. 配置文件示例 Automotive MasterAutomotive profile example configuration for master containing those attributes which differ from the default configuration. Refer to ptp4l(8) for the complete list of available options. [global] # Options carried over from gPTP. gmCapable 1 #让本地时钟可以作为grandmaster 使用802.1AS时钟 priority1 248 #本地时钟的priority1属性。它用于PTP服务器选择算法较低的值优先。必须在0到255之间。默认值为128。 priority2 248 #本地时钟的priority2属性。它用于PTP服务器选择算法较低的值优先。必须在0到255之间。默认值为128。 logSyncInterval -3 syncReceiptTimeout 3 neighborPropDelayThresh 800 min_neighbor_prop_delay -20000000 assume_two_step 1 path_trace_enabled 1 follow_up_info 1 transportSpecific 0x1 ptp_dst_mac 01:80:C2:00:00:0E network_transport L2 delay_mechanism P2P # # Automotive Profile specific options # BMCA noop serverOnly 1 inhibit_announce 1 asCapable true inhibit_delay_req 1说实话配置文件我没有用。目前来看指令比较简单。可能面对特殊的环境和应用需要做配置文件发布和定制。会比较好。 比如车内TSN就需要配置文件 指明使用TSN AS协议。 phc2sys(8): synchronize two or more clocks phc2sys is a program which synchronizes two or more clocks in the system. Typically, it is used to synchronize the system clock to a PTP hardware clock (PHC), which itself is synchronized by the ptp4l(8) program.With the -a option, the clocks to synchronize are fetched from the running ptp4l daemon and the direction of synchronization automatically follows changes of the PTP port states.Manual configuration is also possible. When using manual configuration, two synchronization modes are supported, one uses a pulse per second (PPS) signal provided by the source clock and the other mode reads time from the source clock directly. Some clocks can be used in both modes, the mode which will synchronize the time sink with better accuracy depends on hardware and driver implementation. 网卡的硬件时钟是PTP或者叫PHC。程序用的时钟是上面的CLOCK_REALTIME phc2sys的作用就是在自己内部不同的时钟之间做同步。 常用指令 -a Read the clocks to synchronize from running ptp4l and follow changes in the port states, adjusting the synchronization direction automatically. The system clock (CLOCK_REALTIME) is not synchronized, unless the -r option is also specified. 似乎是添加经由ptp4l同步的时钟软或者硬实现同步进入同步组。和谁同步呢-a说是自动选择但是我没考虑过如果不指定还能和谁同步。 这里指出了-r表示开启CLOCK_REALTIME作为同步对象。 也就是说 phc2sys -a -r 是从ptp4l的同步时钟–同步至–》CLOCK_REALTIME -r Only valid together with the -a option. Instructs phc2sys to also synchronize the system clock (CLOCK_REALTIME). By default, the system clock is not considered as a possible time source. If you want the system clock to be eligible to become a time source, specify the -r option twice. 这里实际上指出要使用-rr phc2sys -a -rr -rr表示把系统时钟当做了时钟源然后 CLOCK_REALTIME–同步至–PHC 我之前测试的时候没有在作为grandmaster的host内执行phc2sys -a -rr 造成虽然我在host内用date修改了时间但是slave的时间虽然运行了phc2sys -a -r也没有被修改。 甚至在slave同步成功后变成了UNXI Epoch。 总结 【grand master】 phc2sys -a -rr # sys time -- ptp clock ptp4l -i 网卡 -H -m # 指定接口网卡 使用硬件时钟 打印log【slave】 ptp4l -i 网卡 -H -m -s# -s 表示仅仅以 slave的模式执行 phc2sys -a -r# ptp clock -- sys time
http://www.dnsts.com.cn/news/104987.html

相关文章:

  • 宝安公司网站建设比较好的wordpress同标题覆盖
  • 深圳网站优化项目唯品会网站建设 分析报告
  • 赤峰网站建设建站公司济宁营销型网站建设
  • 莱芜网络公司案例seo sem是做什么的
  • 金山网站建设广告公司平面设计主要做什么
  • 中国建设银行信用卡中心网站酒店招聘做的好的网站
  • 外贸公司几个网站电子相册在线制作网站
  • 建设工程教育网视频网站前端开发主要做什么
  • 将网站做成logo怎么做云南楚雄医药高等专科学校
  • 安徽建设工程信息网官短视频seo询盘系统
  • 凡客另一购物网站网站做电商资质
  • 佛山网站建设费用东莞市外贸网站建设多少钱
  • 体育直播网站建设晋江网站建设费用
  • php大型网站开发视频网站建设 排行
  • 网站设计素材网站东莞招聘信息最新招聘2022
  • 南阳那里有做网站的关于网站开发的文档
  • 做网站和app那个花销大响水做网站的价格
  • 内蒙古建设协会网站整形网站整站源码
  • 山东建设局网站电工网站打开速度概念
  • 模板网站外链做不起来百度cdn wordpress
  • 青岛地产网站建设广州网站建设小程序开发
  • 化妆品 营销型网站孝感网站建设专家
  • 三亚本地网站建设wordpress主页不加index.php 打不开
  • 福永招聘网站建设正规挣钱最快的游戏
  • 学校网站制作素材怎么做类似美团的网站
  • 网站icp备案手续温州大型网站设计公司
  • 乔柘云智能建站南京seo按天计费
  • 网站建设 佛山网页设计欣赏熊出没
  • wordpress浮动留言板昆山优化外包
  • 网络游戏网站制作自己怎么开网店的步骤