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
subscription-manager repos --enable=rhceph-5-tools-for-rhel-8-x86_64-rpms
[root@client ~]# subscription-manager repos --enable=rhceph-5-tools-for-rhel-8-x86_64-rpms
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Red Hat Enterprise Linux 9
subscription-manager repos --enable=rhceph-5-tools-for-rhel-9-x86_64-rpms
[root@client ~]# subscription-manager repos --enable=rhceph-5-tools-for-rhel-9-x86_64-rpms
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 安装
cephfs-top
软件包:示例
dnf install cephfs-top
[root@client ~]# dnf install cephfs-top
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 启用 Ceph Manager
stats
插件:示例
ceph mgr module enable stats
[root@client ~]# ceph mgr module enable stats
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 创建
client.fstop
Ceph 用户:示例
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
[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
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 注意(可选)使用
--id
参数指定与client.fstop
以外的不同的 Ceph 用户。启动
cephfs-top
工具:示例
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 注意默认情况下,
cephfs-top
连接到存储集群名称 ceph。要使用非默认存储集群名称,可以将--cluster NAME
选项与cephfs-top
实用程序一起使用。