Red Hat Training

A Red Hat training course is available for Red Hat Enterprise Linux

20.5. 使用 PTP 管理客户端

PTP 管理客户端 pmc 可以用来从 ptp4l 获取更多信息,如下所示:

~]# pmc -u -b 0 'GET CURRENT_DATA_SET'
sending: GET CURRENT_DATA_SET
    90e2ba.fffe.20c7f8-0 seq 0 RESPONSE MANAGMENT CURRENT_DATA_SET
        stepsRemoved    1
        offsetFromMaster -142.0
        meanPathDelay   9310.0
~]# pmc -u -b 0 'GET TIME_STATUS_NP'
sending: GET TIME_STATUS_NP
    90e2ba.fffe.20c7f8-0 seq 0 RESPONSE MANAGMENT TIME_STATUS_NP
        master_offset       310
        ingress_time        1361545089345029441
        cumulativeScaledRateOffset  +1.000000000
        scaledLastGmPhaseChange  0
        gmTimeBaseIndicator    0
        lastGmPhaseChange     0x0000'0000000000000000.0000
        gmPresent         true
        gmIdentity         00a069.fffe.0b552d

-b 选项设置为 ,将边界限制为本地运行的 ptp4l 实例。更大的边界值将从本地时钟进一步检索 PTP 节点的信息。可检索的信息包括:

  • stepsRemoved 是到movmaster 时钟的通信路径数。
  • offsetFromMaster 和 master_offset 是 master 最后一次测量时钟偏移(以纳秒为单位)。
  • meanPathDelay 是从主控机(以纳秒为单位)发送的同步消息的预计延迟。
  • 如果 gmPresent 为 true,P TP 时钟与 master 同步,本地时钟不是默认时钟。
  • gmIdentity 是宿主的身份。

要获得 pmc 命令的完整列表,以 root 用户身份输入以下内容:

~]# pmc help

pmc(8)man page 中提供了其他信息。