RDMA-STATISTIC(8)
๐ rdma-statistic โ RDMA statistic counter configuration ๐
okay bestie, sit down, hydrate, and let me tell you about rdma-statistic, which lives in the Linux manual, section 8 (that's the admin-tools girlies). It's the rdma subcommand that handles all your statistic counter configuration. yes. counters. we're doing counters today. slay. โจ
๐ NAME ๐
rdma-statistic โ RDMA statistic counter configuration. that's it, that's the whole name, she's concise and she knows it. ๐
๐ธ SYNOPSIS ๐ธ
rdma [ OPTIONS ] statistic { COMMAND | help }
rdma statistic { OBJECT } show
rdma statistic [ OBJECT ] show link [ DEV/PORT_INDX ] [ FILTER_NAME
FILTER_VALUE ]
rdma statistic OBJECT mode
rdma statistic OBJECT set COUNTER_SCOPE [ DEV/PORT_INDEX ] auto {
CRITERIA | off } [ optional-counters | on/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 ] [ OBJECT-ID ]
rdma statistic mode [ supported ] link [ DEV/PORT_INDEX ]
rdma statistic set link [ DEV/PORT_INDEX ] optional-counters [ OPTIONAL-
COUNTERS ]
rdma statistic unset link [ DEV/PORT_INDEX ] optional-counters
COUNTER_SCOPE := { link | dev }
OBJECT := { qp | mr }
CRITERIA := { type | pid }
FILTER_NAME := { cntn | lqpn | pid | qp-type }
look at her. gorgeous. every line exactly where it should be. no notes. ๐ฆ
๐ DESCRIPTION ๐
โจ rdma statistic [object] show โ display RDMA statistics โจ
she queries the RDMA device you point her at for RDMA statistics and driver-specific statistics. if you don't specify an object, you just get the default hw counters. simple. iconic. ๐ซถ
DEVโ specifies counters on this RDMA device to show.PORT_INDEXโ specifies counters on this RDMA port to show.FILTER_NAMEโ specifies a filter to show only the results matching it.
โจ rdma statistic <object> set โ configure counter statistic auto-mode for a specific device/port โจ
in auto mode, every object that belongs to one category gets bound automatically to a single counter set. and listen โ the "off" setting is global for all auto modes together. not per-mode. all of them. together. noted. ๐ also: not applicable for MR's. sorry to the MR girlies, this one's not for you.
โจ rdma statistic <object> bind โ manually bind an object (e.g., a qp) with a counter โจ
when it's bound, the statistics of that object show up in that counter. that's the whole vibe. ๐ and again โ not applicable for MR's.
โจ rdma statistic <object> unbind โ manually unbind an object (e.g., a qp) from the counter previously bound โจ
once unbound, the statistics of that object are no longer available in that counter. and here's the tea ๐ต: if the object id isn't specified, then all objects on this counter will be unbound. all of them. bye. and yep โ not applicable for MR's.
COUNTER-IDโ specifies the id of the counter to be bound. if you leave this argument out, a new counter will be allocated for you. so generous.
โจ rdma statistic mode โจ
displays the enabled optional counters for each link. ๐
โจ rdma statistic mode supported โจ
displays the supported optional counters for each link. different list, bestie, don't mix them up.
โจ rdma statistic set โจ
enables a set of optional counters for a specific device/port.
OPTIONAL-COUNTERSโ specifies the name of the optional counters to enable. any optional counters you don't name will be disabled. and heads up: optional counters are driver-specific. so what works on one driver might not exist on another. iykyk.
โจ rdma statistic unset โจ
disables all optional counters for a specific device/port. every single one. no survivors. ๐
๐ฅ EXAMPLES ๐ฅ
okay this is the part where it all clicks. read every single one, they're all little treasures:
rdma statistic showshows the state of the default counter of all RDMA devices on the system.rdma statistic show link mlx5_2/1shows the state of the default counter of specified RDMA port.rdma statistic qp showshows the state of all qp counters of all RDMA devices on the system.rdma statistic qp show link mlx5_2/1shows the state of all qp counters of specified RDMA port.rdma statistic qp show link mlx5_2 pid 30489shows the state of all qp counters of specified RDMA port and belonging to pid30489.rdma statistic qp show link mlx5_2 qp-type UDshows the state of all qp counters of specified RDMA port and with QP typeUD.rdma statistic qp modelist current counter mode on all devices.rdma statistic qp mode link mlx5_2/1list current counter mode of devicemlx5_2port1.rdma statistic qp set link mlx5_2/1 auto type onon devicemlx5_2port1, for each new user QP bind it with a counter automatically. per counter for QPs with same qp type.rdma statistic qp set link mlx5_2/1 auto type on optional-counters onon devicemlx5_2port1, for each new user QP bind it with a counter automatically. per counter for QPs with same qp type. whilst also binding the currently enabled optional-counters.rdma statistic qp set link mlx5_2/1 auto pid onon devicemlx5_2port1, for each new user QP bind it with a counter automatically. per counter for QPs with same pid.rdma statistic qp set link mlx5_2/1 auto pid,type onon devicemlx5_2port1, for each new user QP bind it with a counter automatically. per counter for QPs with same pid and same type.rdma statistic qp set link mlx5_2/1 auto offturn-off auto mode on devicemlx5_2port1. the allocated counters can be manually accessed.rdma statistic qp bind link mlx5_2/1 lqpn 178on devicemlx5_2port1, allocate a counter and bind the specified qp on it.rdma statistic qp unbind link mlx5_2/1 cntn 4 lqpn 178on devicemlx5_2port1, bind the specified qp on the specified counter.rdma statistic qp unbind link mlx5_2/1 cntn 4on devicemlx5_2port1, unbind all QPs on the specified counter. after that this counter will be released automatically by the kernel.rdma statistic show mrlist all currently allocated MR's and their counters.rdma statistic show mr mrn 6dump a specific MR statistics with mrn6. dumps nothing if it does not exist.rdma statistic mode link mlx5_2/1display the optional counters that were enabled onmlx5_2/1.rdma statistic mode supported link mlx5_2/1display the optional counters thatmlx5_2/1supports.rdma statistic set link mlx5_2/1 optional-counters cc_rx_ce_pkts,cc_rx_cnp_pktsenable thecc_rx_ce_pkts,cc_rx_cnp_pktscounters on devicemlx5_2port1.rdma statistic unset link mlx5_2/1 optional-countersdisable all the optional counters on devicemlx5_2port1.
๐ SEE ALSO ๐
go read her friends, they're all serving:
๐ AUTHORS ๐
the literal legends who made this happen, bow down:
- Mark Zhang
<markz@mellanox.com> - Erez Alfasi
<ereza@mellanox.com> - Neta Ostrovsky
<netao@nvidia.com>
and that's the whole page, bestie ๐ซถ she's from iproute2, dated 27 June 2019, and honestly? she ate and left no crumbs. go forth and count your statistics. periodt. โจ๐ ๐
๐ฆ where this page comes from
- alpine 3.24: iproute2-doc 7.0.0-r0 ยท GPL-2.0-or-later
- arch rolling: iproute2 7.2.0-1
- arch rolling: iproute2 7.3.0-1 ยท GPL-2.0-or-later
- centos-stream 10: iproute 7.0.0-2.el10 ยท GPL-2.0-or-later AND NIST-PD
- nixos 26.05: iproute2 7.0.0
- nixpkgs unstable: iproute2 7.2.0
- ubuntu stonking: iproute2 7.2.0-1ubuntu1 ยท GPL-2.0-only
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms