5.2. 使用 cephfs-top 工具
Ceph 文件系统(CephFS)提供了一个类似于 top 的实用程序,以实时显示 Ceph 文件系统上的指标。cephfs-top 实用程序是一个基于 curses 的 Python 脚本,它使用 Ceph Manager stats 模块来获取和显示客户端性能指标。
目前,cephfs-top 实用程序支持几乎 10k 客户端。
目前,Red Hat Enterprise Linux 8 内核不提供所有性能统计。Red Hat Enterprise Linux 8 及更高版本支持 CephFS -top,并使用 Red Hat Enterprise Linux 中的其中一个标准终端。
cephfs-top 实用程序的最低兼容 python 版本为 3.6.0。
先决条件
- 一个健康且运行 Red Hat Ceph Storage 集群。
- 部署 Ceph 文件系统.
- Ceph 客户端节点的根级别访问权限。
-
安装
cephfs-top软件包。
流程
启用 Red Hat Ceph Storage 5 工具存储库(如果还没有启用):
Red Hat Enterprise Linux 8
[root@client ~]# subscription-manager repos --enable=rhceph-5-tools-for-rhel-8-x86_64-rpmsRed Hat Enterprise Linux 9
[root@client ~]# subscription-manager repos --enable=rhceph-5-tools-for-rhel-9-x86_64-rpms安装
cephfs-top软件包:示例
[root@client ~]# dnf install cephfs-top启用 Ceph Manager
stats插件:示例
[root@client ~]# ceph mgr module enable stats创建
client.fstopCeph 用户:示例
[root@client ~]# ceph auth get-or-create client.fstop mon 'allow r' mds 'allow r' osd 'allow r' mgr 'allow r' > /etc/ceph/ceph.client.fstop.keyring注意(可选)使用
--id参数指定与client.fstop以外的不同的 Ceph 用户。启动
cephfs-top工具:示例
[root@client ~]# cephfs-top cephfs-top - Thu Jun 15 16:27:14 2023 All Filesystem Info Total Client(s): 4 - 3 FUSE, 1 kclient, 0 libcephfs COMMANDS: m - select a filesystem | s - sort menu | l - limit number of clients | r -reset to default | q - quit client_id mount_root chit(%) dlease(%) ofiles oicaps oinodes rtio(MB) raio(MB) rsp(ms) wtio(ms) waio(MB) wsp(MB/s) rlatavg(ms) rlatsd(ms) wlatavg(ms) wlatsd(ms) mlatavg(ms) mlatsd(ms) mount_point@host/addr Filesystem: cephfs1 - 2 clients(s) 4482 / 100.0 0.0 0 1 0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 27.36 0.0 N/A@example/192.168.1.4 4488 / 100.0 0.0 0 1 0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.34 0.0 /mnt/cephfs2@example/192.168.1.4 Filesystem: cephfs2 - 2 clients(s) 4494 / 100.0 0.0 0 1 0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.37 0.0 /mnt/cephfs3@example/192.168.1.4 4500 / 100.0 0.0 0 1 0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.29 0.0 /mnt/cephfs4@example/192.168.1.4注意默认情况下,
cephfs-top连接到存储集群名称 ceph。要使用非默认存储集群名称,可以将--cluster NAME选项与cephfs-top实用程序一起使用。