Red Hat Training

A Red Hat training course is available for RHEL 8

第 10 章 使用 Performance Co-Pilot(PCP)监控和分析 GFS2 文件系统

Performance Co-Pilot(PCP)可帮助监控和分析 GFS2 文件系统。PCP 中 GFS2 文件系统的监控是由 Red Hat Enterprise Linux 中的 GFS2 PMDA 模块提供的,该模块可通过 pcp-pmda-gfs2 软件包获得。

GFS2 PMDA 提供了很多由 debugfs 子系统中提供的 GFS2 统计给出的指标。安装后,PMDA 会公开 glocksglstatssbstats 文件中给出的值。报告每个挂载的 GFS2 文件系统的统计组。PMDA 还使用 Kernel Function Tracer(ftrace)公开的 GFS2 内核追踪点。

10.1. 安装 GFS2 PMDA

为了正确操作,GFS2 PMDA 要求 debugfs 文件系统已挂载。如果 debugfs 文件系统没有挂载,请在安装 GFS2 PMDA 前运行以下命令:

# mkdir /sys/kernel/debug
# mount -t debugfs none /sys/kernel/debug

在默认安装中不启用 GFS2 PMDA。要通过 PCP 使用 GFS2 指标监控,您必须在安装后启用它。

运行以下命令来安装 PCP 并启用 GFS2 PMDA。请注意,PMDA 安装脚本必须以 root 用户身份运行。

# yum install pcp pcp-pmda-gfs2
# cd /var/lib/pcp/pmdas/gfs2
# ./Install
Updating the Performance Metrics Name Space (PMNS) ...
Terminate PMDA if already installed ...
Updating the PMCD control file, and notifying PMCD ...
Check gfs2 metrics have appeared ... 346 metrics and 255 values