perfquery(8)
β¨ NAME β¨
perfquery β bestie, this is the one that queries InfiniBand port counters on a single port π
πΈ SYNOPSIS πΈ
perfquery [options] [<lid|guid> [[port(s)] [reset_mask]]]
π DESCRIPTION π
okay so perfquery uses PerfMgt GMPs to go grab your counters from the PMA at the node/port you point it at. And what can it snag? Literally:
- PortCounters (that's the basic performance + error counters)
- PortExtendedCounters
- PortXmitDataSL
- PortRcvDataSL
- PortRcvErrorDetails
- PortXmitDiscardDetails
- PortExtendedSpeedsCounters
- PortSamplesControl
Optionally it'll show you aggregated counters for all ports of a node. And finally β the glow-up β it can reset after read, or just reset the counters. no cap π
Note: In PortCounters, PortCountersExtended, PortXmitDataSL, and PortRcvDataSL, the components that represent Data (likePortXmitDataandPortRcvData) indicate octets divided by 4, not just octets. iykyk, don't @ me, that's just how it is π
Note: Inputting a port of 255 means the operation gets performed on all ports. slay, one number to rule them all β
Note: For PortCounters, ExtendedCounters, and resets, you can specify multiple ports either as a comma separated list or as a port range. See examples below, bestie π
β¨ OPTIONS β¨
-x,--extendedβ show extended port counters instead of the (basic) port counters. Heads up: the extended port counters attribute is optional, so it might not be there, and that's not a you problem.-X,--xmtslβ show transmit data SL counter. This is an optional counter for QoS.-S,--rcvslβ show receive data SL counter. This is an optional counter for QoS.-D,--xmtdiscβ show transmit discard details. This is an optional counter.-E,--rcverrβ show receive error details. This is an optional counter.-D,--xmtdiscβ show transmit discard details. This is an optional counter. (yes bestie, it's listed twice in the original, so it's listed twice here β I don't make the rules π)-T,--extended_speedsβ show extended speeds port counters. This is an optional counter.--oprcvcountersβ show Rcv Counters per Op code. This is an optional counter.--flowctlcountersβ show flow control counters. This is an optional counter.--vloppacketsβ show packets received per Op code per VL. This is an optional counter.--vlopdataβ show data received per Op code per VL. This is an optional counter.--vlxmitflowctlerrorsβ show flow control update errors per VL. This is an optional counter.--vlxmitcountersβ show ticks waiting to transmit counters per VL. This is an optional counter.--swportvlcongβ show sw port VL congestion. This is an optional counter.--rcvccβ show Rcv congestion control counters. This is an optional counter.--slrcvfecnβ show SL Rcv FECN counters. This is an optional counter.--slrcvbecnβ show SL Rcv BECN counters. This is an optional counter.--xmitccβ show Xmit congestion control counters. This is an optional counter.--vlxmittimeccβ show VL Xmit Time congestion control counters. This is an optional counter.-c,--smplctlβ show port samples control.-a,--all_portsβ show aggregated counters for all ports of the destination lid, reset all counters for all ports, or if multiple ports are specified, aggregate the counters of the specified ports. And if the destination lid does not support the AllPortSelect flag, it'll iterate through all ports to emulate AllPortSelect behavior. iconic problem-solving tbh β¨-l,--loop_portsβ if all ports are selected by the user (either through the-aoption or port 255) or multiple ports are specified, iterate through each port rather than doing the aggregate operation. one by one, main character energy π-r,--reset_after_readβ reset counters after read.-R,--Reset_onlyβ only reset counters.
π― Addressing Flags
-G,--Guidβ The address specified is a Port GUID.-L,--Lidβ The address specified is a LID.-s,--sm_port <smlid>β usesmlidas the target lid for SA queries.
π¦ Port Selection flags
-C,--Ca <ca_name>β use the specifiedca_name.-P,--Port <ca_port>β use the specifiedca_port.-Y,--pkey-idx <idx>β P_Key table index (0-65535, default 0) used for the outgoing SA/GMP MADs. SMP (SMI directed-route/LID-routed) MADs always use P_Key index 0. no exceptions, periodt.
π Local port Selection
Multiple port / Multiple CA support: when no IB device or port is specified (see the "local umad parameters" below), the libibumad library picks the port to use by these criteria, in order:
- the first port that is ACTIVE.
- if not found, the first port that is UP (physical link up).
If a port and/or CA name is specified, the libibumad library attempts to fulfill the user request, and will fail if it's not possible. it's giving "I said what I said" π€
For example:
ibaddr # use the first port (criteria #1 above)
ibaddr -C mthca1 # pick the best port from "mthca1" only.
ibaddr -P 2 # use the second (active/up) port from the first available IB device.
ibaddr -C mthca0 -P 2 # use the specified port only.
π₯ Debugging flags
-dβ raise the IB debugging level. May be used several times (-dddor-d -d -d). go off, stack them π-eβ show send and receive errors (timeouts and others).-h,--helpβ show the usage message.-v,--verboseβ increase the application verbosity level. May be used several times (-vvor-v -v -v).-V,--versionβ show the version info.
π Configuration flags
-t,--timeout <timeout_ms>β override the default timeout for the solicited mads.-y,--m_key <key>β use the specified M_key for requests. If a non-numeric value (like'x') is specified, then a value will be prompted for. cute little interactive moment π--config,-z <config_file>β Specify alternate config file.- Default:
/etc/infiniband-diags/ibdiag.conf
- Default:
π FILES π
π CONFIG FILE
/etc/infiniband-diags/ibdiag.conf
A global config file is provided to set some of the common options for all tools. See the supplied config file for details.
π EXAMPLES π
perfquery # read local port performance counters
perfquery 32 1 # read performance counters from lid 32, port 1
perfquery -x 32 1 # read extended performance counters from lid 32, port 1
perfquery -a 32 # read perf counters from lid 32, all ports
perfquery -r 32 1 # read performance counters and reset
perfquery -x -r 32 1 # read extended performance counters and reset
perfquery -R 0x20 1 # reset performance counters of port 1 only
perfquery -x -R 0x20 1 # reset extended performance counters of port 1 only
perfquery -R -a 32 # reset performance counters of all ports
perfquery -R 32 2 0x0fff # reset only error counters of port 2
perfquery -R 32 2 0xf000 # reset only non-error counters of port 2
perfquery -a 32 1-10 # read performance counters from lid 32, port 1-10, aggregate output
perfquery -l 32 1-10 # read performance counters from lid 32, port 1-10, output each port
perfquery -a 32 1,4,8 # read performance counters from lid 32, port 1, 4, and 8, aggregate output
perfquery -l 32 1,4,8 # read performance counters from lid 32, port 1, 4, and 8, output each port
π AUTHOR π
Hal Rosenstock < <hal.rosenstock@gmail.com> >
okay bestie that's the whole thing, you ate it up π this page is from Open IB Diagnostics, dated 2017-08-21, and it's perfquery(8) β go query some counters, you've got this π«Άβ¨
π¦ where this page comes from
- arch rolling: rdma-core 65.0-1 Β· GPL-2.0-or-later OR LicenseRef-OpenIB.org-BSD-MIT AND GPL-2.0-or-later OR LicenseRef-OpenIB.org-BSD-FreeBSD AND GPL-2.0-or-later OR LicenseRef-Intel-BSD-3-Clause AND GPL-2.0-or-later OR LicenseRef-PathScale-BSD-Patent-License AND CC0-1.0 AND MIT AND BSD-2-Clause AND CPL-1.0 OR BSD-2-Clause OR GPL-2.0-or-later
- ubuntu stonking: infiniband-diags 64.0-1ubuntu1 Β· BSD-MIT OR GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms