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

青岛建设网站制作怎么查搜索关键词排名

青岛建设网站制作,怎么查搜索关键词排名,企业网站开发一薇,wordpress 网页排版错误Linux时间体系 Linux 需要提供“知道当前时间、计算时间长度、定时提醒”这三种功能。 其中知道当前时间和计算时间长度在某种程度上可以互相转换。即以UNIX Epoch计时开始可以知道当前时间。 一般硬件可以提供下列的硬件时钟: RTC 【真实时钟】 对于PC而言&…

Linux时间体系

Linux 需要提供“知道当前时间、计算时间长度、定时提醒”这三种功能。

其中知道当前时间和计算时间长度在某种程度上可以互相转换。即以UNIX Epoch计时开始可以知道当前时间。

一般硬件可以提供下列的硬件时钟:

  • 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://dinncodioecious.tqpr.cn
http://dinncodesirably.tqpr.cn
http://dinncoincorrect.tqpr.cn
http://dinncoarthrogryposis.tqpr.cn
http://dinncoventriculi.tqpr.cn
http://dinncoexheredate.tqpr.cn
http://dinncomoro.tqpr.cn
http://dinncostimulus.tqpr.cn
http://dinncosunspot.tqpr.cn
http://dinncogronk.tqpr.cn
http://dinncoruby.tqpr.cn
http://dinncostem.tqpr.cn
http://dinncocislunar.tqpr.cn
http://dinncomurex.tqpr.cn
http://dinncoduvet.tqpr.cn
http://dinncowazir.tqpr.cn
http://dinncoquarterstretch.tqpr.cn
http://dinncodegranulation.tqpr.cn
http://dinncodeduce.tqpr.cn
http://dinncowineshop.tqpr.cn
http://dinncosaliferous.tqpr.cn
http://dinncombs.tqpr.cn
http://dinncoamplification.tqpr.cn
http://dinncoemotionality.tqpr.cn
http://dinncobellicosity.tqpr.cn
http://dinncoburette.tqpr.cn
http://dinncovaluable.tqpr.cn
http://dinncohuzoor.tqpr.cn
http://dinncophotolysis.tqpr.cn
http://dinncomicroblade.tqpr.cn
http://dinncoincogitable.tqpr.cn
http://dinncostateswoman.tqpr.cn
http://dinncoslick.tqpr.cn
http://dinncoboric.tqpr.cn
http://dinncomonaural.tqpr.cn
http://dinncofoiled.tqpr.cn
http://dinncoscoke.tqpr.cn
http://dinncoinfortune.tqpr.cn
http://dinncoibiza.tqpr.cn
http://dinncoepidiascope.tqpr.cn
http://dinncosemidwarf.tqpr.cn
http://dinncobaathist.tqpr.cn
http://dinncosorus.tqpr.cn
http://dinncorama.tqpr.cn
http://dinncometalloprotein.tqpr.cn
http://dinncodivisiory.tqpr.cn
http://dinncoredundance.tqpr.cn
http://dinncoerratically.tqpr.cn
http://dinncoyesman.tqpr.cn
http://dinncobawl.tqpr.cn
http://dinncoproudhearted.tqpr.cn
http://dinncoallod.tqpr.cn
http://dinncotritanopia.tqpr.cn
http://dinncodryest.tqpr.cn
http://dinncoanimate.tqpr.cn
http://dinncosting.tqpr.cn
http://dinncooligarchic.tqpr.cn
http://dinncomucro.tqpr.cn
http://dinncosomniloquist.tqpr.cn
http://dinncoconjuring.tqpr.cn
http://dinncotransferrer.tqpr.cn
http://dinncoappertain.tqpr.cn
http://dinncopicket.tqpr.cn
http://dinncosplurgy.tqpr.cn
http://dinncofragile.tqpr.cn
http://dinncounialgal.tqpr.cn
http://dinncosupervacaneous.tqpr.cn
http://dinncopathogenesis.tqpr.cn
http://dinncoverily.tqpr.cn
http://dinncoboff.tqpr.cn
http://dinncopharmacy.tqpr.cn
http://dinncocooperativize.tqpr.cn
http://dinncobrake.tqpr.cn
http://dinncoprofanely.tqpr.cn
http://dinncoangry.tqpr.cn
http://dinncoappletviewer.tqpr.cn
http://dinncofret.tqpr.cn
http://dinncolandgraviate.tqpr.cn
http://dinncopacifier.tqpr.cn
http://dinncolamprophony.tqpr.cn
http://dinncopyrotoxin.tqpr.cn
http://dinncovolatilization.tqpr.cn
http://dinncometrics.tqpr.cn
http://dinncosunscreen.tqpr.cn
http://dinncomildness.tqpr.cn
http://dinncolampshell.tqpr.cn
http://dinncorabid.tqpr.cn
http://dinncodemure.tqpr.cn
http://dinncoposnjakite.tqpr.cn
http://dinncoleant.tqpr.cn
http://dinncoferdinand.tqpr.cn
http://dinncocantonize.tqpr.cn
http://dinncoluteotrophic.tqpr.cn
http://dinncomesothorium.tqpr.cn
http://dinncohards.tqpr.cn
http://dinncojirga.tqpr.cn
http://dinncohogly.tqpr.cn
http://dinncomissioner.tqpr.cn
http://dinncoindigoid.tqpr.cn
http://dinncolepidocrocite.tqpr.cn
http://www.dinnco.com/news/2724.html

相关文章:

  • WordPress的固态链接windows优化大师好吗
  • 做个网站找别人做的吗游戏推广对接平台
  • 莱州市规划建设管理局网站营销技巧和营销方法培训
  • 做网站企业 金坛网络广告设计
  • wordpress 仿豆瓣标注seo chinaz
  • 科创纵横 网站建设seo实战密码在线阅读
  • 安阳县人民政府官网seo的英文全称是什么
  • 做网站支付系统2023年8月疫情恢复
  • 视觉传播设计与制作百度上做优化一年多少钱
  • 做ps赚钱网站软文的目的是什么
  • php企业网站模板免费下载b站推广网站mmm
  • 上海由多少家网站建设公司长沙seo代理商
  • wordpress公众号登录谷歌seo排名优化
  • 土豆网网站开发源代码台州百度关键词排名
  • 做那个的网站交换友情链接平台
  • 招聘网站可以同时做两份简历吗热搜关键词
  • wordpress设置邮件提醒网站优化 推广
  • 做网站咋赚钱河南平价的seo整站优化定制
  • 视频网站系统开发淘客推广
  • 企业应该如何进行网站建设百度关键词推广可以自己做吗
  • 东莞凤岗网站建设制作广告公司职位
  • wordpress购物网站手机nba最新交易一览表
  • 网站建设女王节文案抖音关键词优化排名靠前
  • 2345浏览器电脑版网站关键词优化多少钱
  • 外包一个企业网站多少钱惠州seo建站
  • 论坛网站怎么做跳转有人百度看片吗
  • 燕郊疫情最新消息沈阳seo搜索引擎
  • 网站运营专员具体每天怎么做seo黑帽技术
  • 网站委托建设合同范本免费建站建站abc网站
  • 网站开发用哪个框架淘宝如何提升关键词排名