背景
查看qp、mr、pd、cq等数量
命令
rdma res show
# res是resource的缩写
实操
其他
- rdma命令所在rpm包:iproute-5.15.0-4.an8.x86_64
rdma的命令还有其他更多的功能
可以通过rdma [obj] 然后 help命令查看,兑现各有几个dev、link、resource、system、statistic、help
比如:
[root@security ~]# rdma dev help
Usage: rdma dev show [DEV]rdma dev set [DEV] name DEVNAMErdma dev set [DEV] netns NSNAMErdma dev set [DEV] adaptive-moderation [on|off]
[root@security ~]# rdma link help
Usage: rdma link show [DEV/PORT_INDEX]
Usage: rdma link add NAME type TYPE netdev NETDEV
Usage: rdma link delete NAME
[root@security ~]# rdma resource help
Usage: rdma resourceresource show [DEV]resource show [qp|cm_id|pd|mr|cq|ctx|srq]resource show qp link [DEV/PORT]resource show qp link [DEV/PORT] [FILTER-NAME FILTER-VALUE]resource show cm_id link [DEV/PORT]resource show cm_id link [DEV/PORT] [FILTER-NAME FILTER-VALUE]resource show cq link [DEV/PORT]resource show cq link [DEV/PORT] [FILTER-NAME FILTER-VALUE]resource show pd dev [DEV]resource show pd dev [DEV] [FILTER-NAME FILTER-VALUE]resource show mr dev [DEV]resource show mr dev [DEV] [FILTER-NAME FILTER-VALUE]resource show ctx dev [DEV]resource show ctx dev [DEV] [FILTER-NAME FILTER-VALUE]resource show srq dev [DEV]resource show srq dev [DEV] [FILTER-NAME FILTER-VALUE]
[root@security ~]# rdma system help
Usage: rdma system show [ netns ]rdma system set netns { shared | exclusive }
[root@security ~]# rdma statistic help
Usage: rdma [ OPTIONS ] statistic { COMMAND | help }rdma statistic OBJECT showrdma statistic OBJECT show link [ DEV/PORT_INDEX ] [ FILTER-NAME FILTER-VALUE ]rdma statistic OBJECT moderdma statistic OBJECT set COUNTER_SCOPE [DEV/PORT_INDEX] auto {CRITERIA | off}rdma statistic OBJECT bind COUNTER_SCOPE [DEV/PORT_INDEX] [OBJECT-ID] [COUNTER-ID]rdma statistic OBJECT unbind COUNTER_SCOPE [DEV/PORT_INDEX] [COUNTER-ID]rdma statistic showrdma statistic show link [ DEV/PORT_INDEX ]
where OBJECT: = { qp }CRITERIA : = { type }COUNTER_SCOPE: = { link | dev }FILTER_NAME: = { cntn | lqpn | pid }
Examples:rdma statistic qp showrdma statistic qp show link mlx5_2/1rdma statistic qp moderdma statistic qp mode link mlx5_0rdma statistic qp set link mlx5_2/1 auto type onrdma statistic qp set link mlx5_2/1 auto offrdma statistic qp bind link mlx5_2/1 lqpn 178rdma statistic qp bind link mlx5_2/1 lqpn 178 cntn 4rdma statistic qp unbind link mlx5_2/1 cntn 4rdma statistic qp unbind link mlx5_2/1 cntn 4 lqpn 178rdma statistic showrdma statistic show link mlx5_2/1
[root@security ~]# rdma help
Usage: rdma [ OPTIONS ] OBJECT { COMMAND | help }rdma [ -f[orce] ] -b[atch] filename
where OBJECT := { dev | link | resource | system | statistic | help }OPTIONS := { -V[ersion] | -d[etails] | -j[son] | -p[retty] -r[aw]}