Menu Close

Red Hat Training

A Red Hat training course is available for OpenShift Container Platform

26.5. 验证节点问题检测程序正在运行

验证节点问题检测程序是否活跃:

  • 运行以下命令以获取 Problem Node Detector pod 的名称:

    # oc get pods -n openshift-node-problem-detector
    
    NAME                          READY     STATUS    RESTARTS   AGE
    node-problem-detector-8z8r8   1/1       Running   0          1h
    node-problem-detector-nggjv   1/1       Running   0          1h
  • 运行以下命令,以查看 Problem Node Detector pod 的日志信息:

    # oc logs -n openshift-node-problem-detector <pod_name>

    输出结果应类似如下:

    # oc logs -n openshift-node-problem-detector node-problem-detector-c6kng
    I0416 23:22:00.641354       1 log_monitor.go:63] Finish parsing log monitor config file: {WatcherConfig:{Plugin:journald PluginConfig:map[source:kernel] LogPath:/host/log/journal Lookback:5m} BufferSize:10 Source:kernel-monitor DefaultConditions:[{Type:KernelDeadlock Status:false Transition:0001-01-01 00:00:00 +0000 UTC Reason:KernelHasNoDeadlock Message:kernel has no deadlock}]
  • 通过模拟节点上的事件来测试节点问题检测程序:

    # echo "kernel: divide error: 0000 [#0] SMP." >> /dev/kmsg
  • 通过模拟节点上的条件来测试节点问题检测程序:

    # echo "kernel: task docker:7 blocked for more than 300 seconds." >> /dev/kmsg