19.8. PTP 硬件快速事件通知框架
虚拟 RAN (vRAN) 等云原生应用需要访问对整个网络运行至关重要的硬件计时事件通知。PTP 时钟同步错误可能会对低延迟应用程序的性能和可靠性造成负面影响,例如:在一个分布式单元 (DU) 中运行的 vRAN 应用程序。
19.8.1. 关于 PTP 和时钟同步错误事件
丢失 PTP 同步是 RAN 网络的一个关键错误。如果在节点上丢失同步,则可能会关闭无线广播,并且网络 Over the Air (OTA) 流量可能会转移到无线网络中的另一个节点。快速事件通知允许集群节点与 DU 中运行的 vRAN 应用程序通信 PTP 时钟同步状态,从而缓解工作负载错误。
事件通知可用于在同一 DU 节点上运行的 vRAN 应用。发布-订阅 REST API 将事件通知传递到消息传递总线。发布-订阅消息传递或发布-订阅消息传递是服务通信架构的异步服务,通过服务通信架构,所有订阅者会立即收到发布到某一主题的消息。
PTP Operator 为每个支持 PTP 的网络接口生成快速事件通知。您可以通过 HTTP 或 Advanced Message Queuing Protocol (AMQP) 消息总线使用 cloud-event-proxy sidecar 容器来访问事件。
PTP 快速事件通知可用于配置为使用 PTP 普通时钟或 PTP 边界时钟。
在可能的情况下,使用 HTTP 传输而不是 AMQP 用于 PTP 和裸机事件。AMQ Interconnect 于 2024 年 6 月 30 日结束生命周期(EOL)。AMQ Interconnect 的延长生命周期支持 (ELS) 于 2029 年 11 月 29 日结束。如需更多信息,请参阅 Red Hat AMQ Interconnect 支持状态。
19.8.2. 关于 PTP 快速事件通知框架
使用 Precision Time Protocol (PTP) 快速事件通知框架,将集群应用程序订阅到裸机集群节点的 PTP 事件。
快速事件通知框架使用 REST API 进行通信。REST API 基于 O-RAN O-Cloud Notification API Specification for Event Consumers 3.0,它包括在 O-RAN ALLIANCE Specifications 中。
框架由发布者、订阅者和 AMQ 或 HTTP 消息传递协议组成,用于处理发布者和订阅者应用程序之间的通信。应用程序以 sidecar 模式运行 cloud-event-proxy 容器,以订阅 PTP 事件。cloud-event-proxy sidecar 容器可以访问与主应用程序容器相同的资源,而无需使用主应用程序的任何资源,且没有大量延迟。
在可能的情况下,使用 HTTP 传输而不是 AMQP 用于 PTP 和裸机事件。AMQ Interconnect 于 2024 年 6 月 30 日结束生命周期(EOL)。AMQ Interconnect 的延长生命周期支持 (ELS) 于 2029 年 11 月 29 日结束。如需更多信息,请参阅 Red Hat AMQ Interconnect 支持状态。
图 19.1. PTP 快速事件概述

-
事件在集群主机上生成 -
PTP Operator 管理的 pod 中的
linuxptp-daemon作为 KubernetesDaemonSet运行,并管理各种linuxptp进程 (ptp4l、phc2sys,以及可选的用于 grandmaster 时钟ts2phc)。linuxptp-daemon将事件传递给 UNIX 域套接字。 -
事件传递给 cloud-event-proxy sidecar -
PTP 插件从 UNIX 域套接字读取事件,并将其传递给 PTP Operator 管理的 pod 中的
cloud-event-proxysidecar。cloud-event-proxy将 Kubernetes 基础架构的事件提供给具有低延迟的 Cloud-Native Network Function (CNF)。 -
事件是持久的 -
PTP Operator 管理的 pod 中的
cloud-event-proxysidecar 处理事件,并使用 REST API 发布云原生事件。 -
消息已传输 -
消息传输程序通过 HTTP 或 AMQP 1.0 QPID 将事件传送到应用程序 pod 中的
cloud-event-proxysidecar。 -
来自 REST API 的事件 -
Application pod 中的
cloud-event-proxysidecar 处理事件并使用 REST API 使其可用。 -
消费者应用程序请求订阅并接收订阅的事件 -
消费者应用程序向应用程序 pod 中的
cloud-event-proxysidecar 发送 API 请求,以创建 PTP 事件订阅。cloud-event-proxysidecar 为订阅中指定的资源创建一个 AMQ 或 HTTP 消息传递监听程序协议。
应用程序 pod 中的 cloud-event-proxy sidecar 接收来自 PTP Operator 管理的 pod 的事件,取消封装云事件对象以检索数据,并将事件发布到消费者应用程序。消费者应用程序侦听资源限定符中指定的地址,并接收和处理 PTP 事件。
19.8.3. 配置 PTP 快速事件通知发布程序
要为集群中的网络接口启动使用 PTP fast 事件通知,您必须在 PTP Operator PtpOperatorConfig 自定义资源 (CR) 中启用快速事件发布程序,并在您创建的 PtpConfig CR 中配置 ptpClockThreshold 值。
先决条件
-
已安装 OpenShift Container Platform CLI (
oc)。 -
您已以具有
cluster-admin权限的用户身份登录。 - 已安装 PTP Operator。
流程
修改默认 PTP Operator 配置以启用 PTP 快速事件。
在
ptp-operatorconfig.yaml文件中保存以下 YAML:apiVersion: ptp.openshift.io/v1 kind: PtpOperatorConfig metadata: name: default namespace: openshift-ptp spec: daemonNodeSelector: node-role.kubernetes.io/worker: "" ptpEventConfig: enableEventPublisher: true 1- 1
- 将
enableEventPublisher设置为true以启用 PTP 快速事件通知。
注意在 OpenShift Container Platform 4.13 或更高版本中,当将 HTTP 传输用于 PTP 事件时,您不需要在
PtpOperatorConfig资源中设置spec.ptpEventConfig.transportHost字段。仅在 PTP 事件中使用 AMQP 传输时设置transportHost。更新
PtpOperatorConfigCR:$ oc apply -f ptp-operatorconfig.yaml
为 PTP 启用接口创建
PtpConfig自定义资源(CR),并设置ptpClockThreshold和ptp4lOpts所需的值。以下 YAML 演示了您必须在PtpConfigCR 中设置的必要值:spec: profile: - name: "profile1" interface: "enp5s0f0" ptp4lOpts: "-2 -s --summary_interval -4" 1 phc2sysOpts: "-a -r -m -n 24 -N 8 -R 16" 2 ptp4lConf: "" 3 ptpClockThreshold: 4 holdOverTimeout: 5 maxOffsetThreshold: 100 minOffsetThreshold: -100- 1
- 附加
--summary_interval -4以使用 PTP 快速事件。 - 2
- 所需的
phc2sysOpts值。-m将消息输出到stdout。linuxptp-daemonDaemonSet解析日志并生成 Prometheus 指标。 - 3
- 指定一个字符串,其中包含要替换默认的
/etc/ptp4l.conf文件的配置。要使用默认配置,请将字段留空。 - 4
- 可选。如果
ptpClockThreshold小节不存在,则默认值用于ptpClockThreshold字段。小节显示默认的ptpClockThreshold值。ptpClockThreshold值配置 PTP master 时钟在触发 PTP 事件前的时长。holdOverTimeout是在 PTP master clock 断开连接时,PTP 时钟事件状态更改为FREERUN前的时间值(以秒为单位)。maxOffsetThreshold和minOffsetThreshold设置以纳秒为单位,它们与CLOCK_REALTIME(phc2sys) 或 master 偏移 (ptp4l) 的值进行比较。当ptp4l或phc2sys偏移值超出这个范围时,PTP 时钟状态被设置为FREERUN。当偏移值在这个范围内时,PTP 时钟状态被设置为LOCKED。
其他资源
-
有关将
linuxptp服务配置为具有 PTP 快速事件的普通时钟的完整示例 CR,请参阅将 linuxptp 服务配置为普通时钟。
19.8.4. 迁移消费者应用程序,以使用 PTP 或裸机事件的 HTTP 传输
如果您之前部署了 PTP 或裸机事件消费者应用程序,您需要更新应用程序以使用 HTTP 消息传输。
先决条件
-
已安装 OpenShift CLI(
oc)。 -
您已以具有
cluster-admin权限的用户身份登录。 - 您已将 PTP Operator 或 Bare Metal Event Relay 更新至使用 HTTP 传输的版本 4.13+。
流程
更新您的事件消费者应用以使用 HTTP 传输。为云事件 sidecar 部署设置
http-event-publishers变量。例如,在配置了 PTP 事件的集群中,以下 YAML 片断演示了一个云事件 sidecar 部署:
containers: - name: cloud-event-sidecar image: cloud-event-sidecar args: - "--metrics-addr=127.0.0.1:9091" - "--store-path=/store" - "--transport-host=consumer-events-subscription-service.cloud-events.svc.cluster.local:9043" - "--http-event-publishers=ptp-event-publisher-service-NODE_NAME.openshift-ptp.svc.cluster.local:9043" 1 - "--api-port=8089"- 1
- PTP Operator 会自动将
NODE_NAME解析为正在生成 PTP 事件的主机。例如,compute-1.example.com。
在配置了裸机事件的集群中,在云事件 sidecar 部署 CR 中将
http-event-publishers字段设置为hw-event-publisher-service.openshift-bare-metal-events.svc.cluster.local:9043。将
consumer-events-subscription-service服务与事件消费者应用程序一起部署。例如:apiVersion: v1 kind: Service metadata: annotations: prometheus.io/scrape: "true" service.alpha.openshift.io/serving-cert-secret-name: sidecar-consumer-secret name: consumer-events-subscription-service namespace: cloud-events labels: app: consumer-service spec: ports: - name: sub-port port: 9043 selector: app: consumer clusterIP: None sessionAffinity: None type: ClusterIP
19.8.5. 安装 AMQ 消息传递总线
要在节点上的发布程序与订阅者之间传递 PTP 快速事件通知,您必须安装和配置 AMQ 消息传递总线,以便在节点上本地运行。要使用 AMQ 消息传递,您必须安装 AMQ Interconnect Operator。
在可能的情况下,使用 HTTP 传输而不是 AMQP 用于 PTP 和裸机事件。AMQ Interconnect 于 2024 年 6 月 30 日结束生命周期(EOL)。AMQ Interconnect 的延长生命周期支持 (ELS) 于 2029 年 11 月 29 日结束。如需更多信息,请参阅 Red Hat AMQ Interconnect 支持状态。
先决条件
-
安装 OpenShift Container Platform CLI(
oc)。 -
以具有
cluster-admin特权的用户身份登录。
流程
-
将 AMQ Interconnect Operator 安装到其自己的
amq-interconnect命名空间。请参阅添加 Red Hat Integration - AMQ Interconnect Operator。
验证
检查 AMQ Interconnect Operator 是否可用,且所需的 pod 是否正在运行:
$ oc get pods -n amq-interconnect
输出示例
NAME READY STATUS RESTARTS AGE amq-interconnect-645db76c76-k8ghs 1/1 Running 0 23h interconnect-operator-5cb5fc7cc-4v7qm 1/1 Running 0 23h
检查所需的
linuxptp-daemonPTP 事件制作者 pod 是否在openshift-ptp命名空间中运行。$ oc get pods -n openshift-ptp
输出示例
NAME READY STATUS RESTARTS AGE linuxptp-daemon-2t78p 3/3 Running 0 12h linuxptp-daemon-k8n88 3/3 Running 0 12h
19.8.6. 将 DU 应用程序订阅到 PTP 事件 REST API 参考
使用 PTP 事件通知 REST API 将分布式单元(DU)应用程序订阅到父节点上生成的 PTP 事件。
使用资源地址 /cluster/node/<node_name>/ptp 将应用程序订阅到 PTP 事件,其中 <node_name> 是运行 DU 应用程序的集群节点。
在单独的 DU 应用程序 pod 中部署 cloud-event-consumer DU 应用程序容器和 cloud-event-proxy sidecar 容器。cloud-event-consumer DU 应用程序订阅应用程序 Pod 中的 cloud-event-proxy 容器。
使用以下 API 端点,将 cloud-event-consumer DU 应用程序订阅到 PTP 事件,这些事件由 cloud-event-proxy 容器发布,位于 DU 应用程序 pod 中的 http://localhost:8089/api/ocloudNotifications/v1/:
/api/ocloudNotifications/v1/subscriptions-
POST:创建新订阅 -
GET:删除订阅列表
-
/api/ocloudNotifications/v1/subscriptions/<subscription_id>-
GET:返回指定订阅 ID 的详情
-
api/ocloudNotifications/v1/subscriptions/status/<subscription_id>-
PUT:为指定订阅 ID 创建新状态 ping 请求
-
/api/ocloudNotifications/v1/health-
GET:返回ocloudNotificationsAPI 的健康状况
-
api/ocloudNotifications/v1/publishers-
GET:为集群节点返回数组os-clock-sync-state、ptp-clock-class-change和lock-state消息
-
/api/ocloudnotifications/v1/<resource_address>/CurrentState-
GET:返回以下事件类型的当前状态:os-clock-sync-state、ptp-clock-class-change或lock-state事件
-
9089 是在应用程序 Pod 中部署的 cloud-event-consumer 容器的默认端口。您可以根据需要为 DU 应用程序配置不同的端口。
19.8.6.1. api/ocloudNotifications/v1/subscriptions
HTTP 方法
GET api/ocloudNotifications/v1/subscriptions
描述
返回订阅列表。如果订阅存在,则返回 200 OK 状态代码以及订阅列表。
API 响应示例
[
{
"id": "75b1ad8f-c807-4c23-acf5-56f4b7ee3826",
"endpointUri": "http://localhost:9089/event",
"uriLocation": "http://localhost:8089/api/ocloudNotifications/v1/subscriptions/75b1ad8f-c807-4c23-acf5-56f4b7ee3826",
"resource": "/cluster/node/compute-1.example.com/ptp"
}
]
HTTP 方法
POST api/ocloudNotifications/v1/subscriptions
描述
创建新订阅。如果订阅成功创建,或者已存在,则返回 201 Created 状态代码。
表 19.5. 查询参数
| 参数 | 类型 |
|---|---|
| subscription | data |
有效负载示例
{
"uriLocation": "http://localhost:8089/api/ocloudNotifications/v1/subscriptions",
"resource": "/cluster/node/compute-1.example.com/ptp"
}
19.8.6.2. api/ocloudNotifications/v1/subscriptions/<subscription_id>
HTTP 方法
GET api/ocloudNotifications/v1/subscriptions/<subscription_id>
描述
返回 ID 为 <subscription_id> 的订阅详情
表 19.6. 查询参数
| 参数 | 类型 |
|---|---|
|
| 字符串 |
API 响应示例
{
"id":"48210fb3-45be-4ce0-aa9b-41a0e58730ab",
"endpointUri": "http://localhost:9089/event",
"uriLocation":"http://localhost:8089/api/ocloudNotifications/v1/subscriptions/48210fb3-45be-4ce0-aa9b-41a0e58730ab",
"resource":"/cluster/node/compute-1.example.com/ptp"
}
19.8.6.3. api/ocloudNotifications/v1/subscriptions/status/<subscription_id>
HTTP 方法
PUT api/ocloudNotifications/v1/subscriptions/status/<subscription_id>
描述
为 ID 为 <subscription_id> 的订阅创建一个新的状态 ping 请求。如果订阅存在,状态请求将成功,并返回 202 Accepted 状态代码。
表 19.7. 查询参数
| 参数 | 类型 |
|---|---|
|
| 字符串 |
API 响应示例
{"status":"ping sent"}
19.8.6.4. api/ocloudNotifications/v1/health/
HTTP 方法
GET api/ocloudNotifications/v1/health/
描述
返回 ocloudNotifications REST API 的健康状况。
API 响应示例
OK
19.8.6.5. api/ocloudNotifications/v1/publishers
HTTP 方法
GET api/ocloudNotifications/v1/publishers
描述
返回集群节点的 os-clock-sync-state、ptp-clock-class-change 和 lock-state 详情的数组。当相关的设备状态改变时,系统会生成通知。
-
os-clock-sync-state通知描述了主机操作系统时钟同步状态。可以是LOCKED或FREERUN状态。 -
ptp-clock-class-change通知描述了 PTP 时钟类的当前状态。 -
lock-state通知描述了 PTP 设备锁定状态的当前状态。可以处于LOCKED、HOLDOVER或FREERUN状态。
API 响应示例
[
{
"id": "0fa415ae-a3cf-4299-876a-589438bacf75",
"endpointUri": "http://localhost:9085/api/ocloudNotifications/v1/dummy",
"uriLocation": "http://localhost:9085/api/ocloudNotifications/v1/publishers/0fa415ae-a3cf-4299-876a-589438bacf75",
"resource": "/cluster/node/compute-1.example.com/sync/sync-status/os-clock-sync-state"
},
{
"id": "28cd82df-8436-4f50-bbd9-7a9742828a71",
"endpointUri": "http://localhost:9085/api/ocloudNotifications/v1/dummy",
"uriLocation": "http://localhost:9085/api/ocloudNotifications/v1/publishers/28cd82df-8436-4f50-bbd9-7a9742828a71",
"resource": "/cluster/node/compute-1.example.com/sync/ptp-status/ptp-clock-class-change"
},
{
"id": "44aa480d-7347-48b0-a5b0-e0af01fa9677",
"endpointUri": "http://localhost:9085/api/ocloudNotifications/v1/dummy",
"uriLocation": "http://localhost:9085/api/ocloudNotifications/v1/publishers/44aa480d-7347-48b0-a5b0-e0af01fa9677",
"resource": "/cluster/node/compute-1.example.com/sync/ptp-status/lock-state"
}
]
您可以在 cloud-event-proxy 容器的日志中找到 os-clock-sync-state、ptp-clock-class-change 和 lock-state 事件。例如:
$ oc logs -f linuxptp-daemon-cvgr6 -n openshift-ptp -c cloud-event-proxy
os-clock-sync-state 事件示例
{
"id":"c8a784d1-5f4a-4c16-9a81-a3b4313affe5",
"type":"event.sync.sync-status.os-clock-sync-state-change",
"source":"/cluster/compute-1.example.com/ptp/CLOCK_REALTIME",
"dataContentType":"application/json",
"time":"2022-05-06T15:31:23.906277159Z",
"data":{
"version":"v1",
"values":[
{
"resource":"/sync/sync-status/os-clock-sync-state",
"dataType":"notification",
"valueType":"enumeration",
"value":"LOCKED"
},
{
"resource":"/sync/sync-status/os-clock-sync-state",
"dataType":"metric",
"valueType":"decimal64.3",
"value":"-53"
}
]
}
}
ptp-clock-class-change 事件示例
{
"id":"69eddb52-1650-4e56-b325-86d44688d02b",
"type":"event.sync.ptp-status.ptp-clock-class-change",
"source":"/cluster/compute-1.example.com/ptp/ens2fx/master",
"dataContentType":"application/json",
"time":"2022-05-06T15:31:23.147100033Z",
"data":{
"version":"v1",
"values":[
{
"resource":"/sync/ptp-status/ptp-clock-class-change",
"dataType":"metric",
"valueType":"decimal64.3",
"value":"135"
}
]
}
}
lock-state 事件示例
{
"id":"305ec18b-1472-47b3-aadd-8f37933249a9",
"type":"event.sync.ptp-status.ptp-state-change",
"source":"/cluster/compute-1.example.com/ptp/ens2fx/master",
"dataContentType":"application/json",
"time":"2022-05-06T15:31:23.467684081Z",
"data":{
"version":"v1",
"values":[
{
"resource":"/sync/ptp-status/lock-state",
"dataType":"notification",
"valueType":"enumeration",
"value":"LOCKED"
},
{
"resource":"/sync/ptp-status/lock-state",
"dataType":"metric",
"valueType":"decimal64.3",
"value":"62"
}
]
}
}
19.8.6.6. /api/ocloudnotifications/v1/<resource_address>/CurrentState
HTTP 方法
GET api/ocloudNotifications/v1/cluster/node/<node_name>/sync/ptp-status/lock-state/CurrentState
GET api/ocloudNotifications/v1/cluster/node/<node_name>/sync/sync-status/os-clock-sync-state/CurrentState
GET api/ocloudNotifications/v1/cluster/node/<node_name>/sync/ptp-status/ptp-clock-class-change/CurrentState
描述
配置 CurrentState API 端点,以返回 os-clock-sync-state、ptp-clock-class-change 或 lock-state 事件的当前状态。
-
os-clock-sync-state通知描述了主机操作系统时钟同步状态。可以是LOCKED或FREERUN状态。 -
ptp-clock-class-change通知描述了 PTP 时钟类的当前状态。 -
lock-state通知描述了 PTP 设备锁定状态的当前状态。可以处于LOCKED、HOLDOVER或FREERUN状态。
表 19.8. 查询参数
| 参数 | 类型 |
|---|---|
|
| 字符串 |
lock-state API 响应示例
{
"id": "c1ac3aa5-1195-4786-84f8-da0ea4462921",
"type": "event.sync.ptp-status.ptp-state-change",
"source": "/cluster/node/compute-1.example.com/sync/ptp-status/lock-state",
"dataContentType": "application/json",
"time": "2023-01-10T02:41:57.094981478Z",
"data": {
"version": "v1",
"values": [
{
"resource": "/cluster/node/compute-1.example.com/ens5fx/master",
"dataType": "notification",
"valueType": "enumeration",
"value": "LOCKED"
},
{
"resource": "/cluster/node/compute-1.example.com/ens5fx/master",
"dataType": "metric",
"valueType": "decimal64.3",
"value": "29"
}
]
}
}
os-clock-sync-state API 响应示例
{
"specversion": "0.3",
"id": "4f51fe99-feaa-4e66-9112-66c5c9b9afcb",
"source": "/cluster/node/compute-1.example.com/sync/sync-status/os-clock-sync-state",
"type": "event.sync.sync-status.os-clock-sync-state-change",
"subject": "/cluster/node/compute-1.example.com/sync/sync-status/os-clock-sync-state",
"datacontenttype": "application/json",
"time": "2022-11-29T17:44:22.202Z",
"data": {
"version": "v1",
"values": [
{
"resource": "/cluster/node/compute-1.example.com/CLOCK_REALTIME",
"dataType": "notification",
"valueType": "enumeration",
"value": "LOCKED"
},
{
"resource": "/cluster/node/compute-1.example.com/CLOCK_REALTIME",
"dataType": "metric",
"valueType": "decimal64.3",
"value": "27"
}
]
}
}
ptp-clock-class-change API 响应示例
{
"id": "064c9e67-5ad4-4afb-98ff-189c6aa9c205",
"type": "event.sync.ptp-status.ptp-clock-class-change",
"source": "/cluster/node/compute-1.example.com/sync/ptp-status/ptp-clock-class-change",
"dataContentType": "application/json",
"time": "2023-01-10T02:41:56.785673989Z",
"data": {
"version": "v1",
"values": [
{
"resource": "/cluster/node/compute-1.example.com/ens5fx/master",
"dataType": "metric",
"valueType": "decimal64.3",
"value": "165"
}
]
}
}
19.8.7. 监控 PTP 快速事件指标
您可以从运行 linuxptp-daemon 的集群节点监控 PTP 快速事件指标。您还可以使用预先配置和自我更新的 Prometheus 监控堆栈来监控 OpenShift Container Platform Web 控制台中的 PTP 快速事件指标。
先决条件
-
安装 OpenShift Container Platform CLI
oc。 -
以具有
cluster-admin特权的用户身份登录。 - 在具有 PTP 功能硬件的节点上安装和配置 PTP Operator。
流程
检查在运行
linuxptp-daemon的任何节点上公开的 PTP 指标。例如,运行以下命令:$ curl http://<node_name>:9091/metrics
输出示例
# HELP openshift_ptp_clock_state 0 = FREERUN, 1 = LOCKED, 2 = HOLDOVER # TYPE openshift_ptp_clock_state gauge openshift_ptp_clock_state{iface="ens1fx",node="compute-1.example.com",process="ptp4l"} 1 openshift_ptp_clock_state{iface="ens3fx",node="compute-1.example.com",process="ptp4l"} 1 openshift_ptp_clock_state{iface="ens5fx",node="compute-1.example.com",process="ptp4l"} 1 openshift_ptp_clock_state{iface="ens7fx",node="compute-1.example.com",process="ptp4l"} 1 # HELP openshift_ptp_delay_ns # TYPE openshift_ptp_delay_ns gauge openshift_ptp_delay_ns{from="master",iface="ens1fx",node="compute-1.example.com",process="ptp4l"} 842 openshift_ptp_delay_ns{from="master",iface="ens3fx",node="compute-1.example.com",process="ptp4l"} 480 openshift_ptp_delay_ns{from="master",iface="ens5fx",node="compute-1.example.com",process="ptp4l"} 584 openshift_ptp_delay_ns{from="master",iface="ens7fx",node="compute-1.example.com",process="ptp4l"} 482 openshift_ptp_delay_ns{from="phc",iface="CLOCK_REALTIME",node="compute-1.example.com",process="phc2sys"} 547 # HELP openshift_ptp_offset_ns # TYPE openshift_ptp_offset_ns gauge openshift_ptp_offset_ns{from="master",iface="ens1fx",node="compute-1.example.com",process="ptp4l"} -2 openshift_ptp_offset_ns{from="master",iface="ens3fx",node="compute-1.example.com",process="ptp4l"} -44 openshift_ptp_offset_ns{from="master",iface="ens5fx",node="compute-1.example.com",process="ptp4l"} -8 openshift_ptp_offset_ns{from="master",iface="ens7fx",node="compute-1.example.com",process="ptp4l"} 3 openshift_ptp_offset_ns{from="phc",iface="CLOCK_REALTIME",node="compute-1.example.com",process="phc2sys"} 12-
要在 OpenShift Container Platform web 控制台中查看 PTP 事件,请复制您要查询的 PTP 指标的名称,如
openshift_ptp_offset_ns。 - 在 OpenShift Container Platform web 控制台中点 Observe → Metrics。
- 将 PTP 指标名称粘贴到 Expression 字段中,然后点 Run query。
其他资源