saquery(8)

πŸ’– NAME πŸ’–

okay so bestie, meet saquery β€” she lives in section 8 of the manual (yes, saquery(8), that's her whole address πŸ’…) and she's part of Open IB Diagnostics. Her job? Querying InfiniBand subnet administration attributes. That's it, that's the vibe. ✨

πŸŽ€ SYNOPSIS πŸŽ€

saquery [options] [<name> | <lid> | <guid>]

🌸 DESCRIPTION 🌸

saquery fires off the SA query you picked. And if you don't pick one? It goes for Node records by default. No cap, that's just the default behavior. πŸ¦‹

✨ OPTIONS ✨

okay this is the part where we go through literally every flag, so grab a snack πŸ“

  • -p β€” get PathRecord info
  • -N β€” get NodeRecord info
  • -D, --list β€” get NodeDescriptions of CAs only
  • -S β€” get ServiceRecord info
  • -I β€” get InformInfoRecord (subscription) info
  • -L β€” return the Lids of the name specified
  • -l β€” return the unique Lid of the name specified
  • -G β€” return the Guids of the name specified
  • -O β€” return the name for the Lid specified
  • -U β€” return the name for the Guid specified
  • -c β€” get the SA's class port info
  • -s β€” return the PortInfoRecords with isSM or isSMdisabled capability mask bit on
  • -g β€” get multicast group info
  • -m β€” get multicast member info. If a group is specified, limit the output to the group specified and print one line containing only the GUID and node description for each entry. Example: saquery -m 0xc000
  • -x β€” get LinkRecord info
  • --src-to-dst <src:dst> β€” get a PathRecord for <src:dst> where src and dst are either node names or LIDs
  • --sgid-to-dgid <sgid:dgid> β€” get a PathRecord for sgid to dgid where both GIDs are in an IPv6 format acceptable to inet_pton(3)
  • --smkey <val> β€” use SM_Key value for the query. Will be used only with "trusted" queries. If a non-numeric value (like 'x') is specified then saquery will prompt for a value. Default (when not specified here or in /etc/infiniband-diags/ibdiag.conf) is to use SM_Key == 0 (or "untrusted")
  • -K, --show_keys β€” show security keys (mkey, smkey, etc.) associated with the request. πŸ‘€
  • --slid <lid> β€” Source LID (PathRecord)
  • --dlid <lid> β€” Destination LID (PathRecord)
  • --mlid <lid> β€” Multicast LID (MCMemberRecord)
  • --sgid <gid> β€” Source GID (IPv6 format) (PathRecord)
  • --dgid <gid> β€” Destination GID (IPv6 format) (PathRecord)
  • --gid <gid> β€” Port GID (MCMemberRecord)
  • --mgid <gid> β€” Multicast GID (MCMemberRecord)
  • --reversible β€” Reversible path (PathRecord)
  • --numb_path β€” Number of paths (PathRecord)
  • --pkey β€” P_Key (PathRecord, MCMemberRecord). If a non-numeric value (like 'x') is specified then saquery will prompt for a value. Note this is the P_Key value queried for, not the P_Key table index of the request MAD itself (see --pkey-idx).
  • --qos_class β€” QoS Class (PathRecord)
  • --sl β€” Service level (PathRecord, MCMemberRecord)
  • --mtu β€” MTU and selector (PathRecord, MCMemberRecord)
  • --rate β€” Rate and selector (PathRecord, MCMemberRecord)
  • --pkt_lifetime β€” Packet lifetime and selector (PathRecord, MCMemberRecord)
  • --qkey β€” Q_Key (MCMemberRecord). If a non-numeric value (like 'x') is specified then saquery will prompt for a value
  • --tclass β€” Traffic Class (PathRecord, MCMemberRecord)
  • --flow_label β€” Flow Label (PathRecord, MCMemberRecord)
  • --hop_limit β€” Hop limit (PathRecord, MCMemberRecord)
  • --scope β€” Scope (MCMemberRecord)
  • --join_state β€” Join state (MCMemberRecord)
  • --proxy_join β€” Proxy join (MCMemberRecord)
  • --service_id β€” ServiceID (PathRecord)

🧚 Supported query names (and aliases) 🧚

ClassPortInfo (CPI)
NodeRecord (NR) [lid]
PortInfoRecord (PIR) [[lid]/[port]/[options]]
SL2VLTableRecord (SL2VL) [[lid]/[in_port]/[out_port]]
PKeyTableRecord (PKTR) [[lid]/[port]/[block]]
VLArbitrationTableRecord (VLAR) [[lid]/[port]/[block]]
InformInfoRecord (IIR)
LinkRecord (LR) [[from_lid]/[from_port]] [[to_lid]/[to_port]]
ServiceRecord (SR)
PathRecord (PR)
MCMemberRecord (MCMR)
LFTRecord (LFTR) [[lid]/[block]]
MFTRecord (MFTR) [[mlid]/[position]/[block]]
GUIDInfoRecord (GIR) [[lid]/[block]]
SwitchInfoRecord (SWIR) [lid]
SMInfoRecord (SMIR) [lid]

πŸ”Œ Port Selection flags πŸ”Œ

  • -C, --Ca <ca_name> β€” use the specified ca_name.
  • -P, --Port <ca_port> β€” use the specified ca_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.

🌈 Local port Selection 🌈

Multiple port / multiple CA support, bestie: 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:

  1. the first port that is ACTIVE.
  2. 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 is not possible. Not a drill. 😭

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 (-ddd or -d -d -d).
  • -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 (-vv or -v -v -v)
  • -V, --version β€” show the version info.

βš™οΈ Configuration flags βš™οΈ

  • -t, --timeout <timeout_ms> β€” override the default timeout for the solicited mads.
  • --outstanding_smps, -o <val> β€” Specify the number of outstanding SMP's which should be issued during the scan. Default: 2
  • --node-name-map <node-name-map> β€” Specify a node name map. This file maps GUIDs to more user friendly names. See FILES section.
  • --config, -z <config_file> β€” Specify alternate config file. Default: /etc/infiniband-diags/ibdiag.conf

πŸ“ COMMON 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 supplied config file for details. πŸ’…

πŸ“ NODE NAME MAP FILE FORMAT πŸ“

The node name map is used to specify user friendly names for nodes in the output. GUIDs are used to perform the lookup.

This functionality is provided by the opensm-libs package. See opensm(8) for the file location for your installation.

Generically:

# comment
<guid> "<name>"

Example:

# IB1
# Line cards
0x0008f104003f125c "IB1 (Rack 11 slot 1   ) ISR9288/ISR9096 Voltaire sLB-24D"
0x0008f104003f125d "IB1 (Rack 11 slot 1   ) ISR9288/ISR9096 Voltaire sLB-24D"
0x0008f104003f10d2 "IB1 (Rack 11 slot 2   ) ISR9288/ISR9096 Voltaire sLB-24D"
0x0008f104003f10d3 "IB1 (Rack 11 slot 2   ) ISR9288/ISR9096 Voltaire sLB-24D"
0x0008f104003f10bf "IB1 (Rack 11 slot 12  ) ISR9288/ISR9096 Voltaire sLB-24D"

# Spines
0x0008f10400400e2d "IB1 (Rack 11 spine 1   ) ISR9288 Voltaire sFB-12D"
0x0008f10400400e2e "IB1 (Rack 11 spine 1   ) ISR9288 Voltaire sFB-12D"
0x0008f10400400e2f "IB1 (Rack 11 spine 1   ) ISR9288 Voltaire sFB-12D"
0x0008f10400400e31 "IB1 (Rack 11 spine 2   ) ISR9288 Voltaire sFB-12D"
0x0008f10400400e32 "IB1 (Rack 11 spine 2   ) ISR9288 Voltaire sFB-12D"

# GUID   Node Name
0x0008f10400411a08 "SW1  (Rack  3) ISR9024 Voltaire 9024D"
0x0008f10400411a28 "SW2  (Rack  3) ISR9024 Voltaire 9024D"
0x0008f10400411a34 "SW3  (Rack  3) ISR9024 Voltaire 9024D"
0x0008f104004119d0 "SW4  (Rack  3) ISR9024 Voltaire 9024D"

πŸ”— DEPENDENCIES πŸ”—

OpenSM (or other running SM/SA), libosmcomp, libibumad, libibmad. Like, she does not run alone bestie, she needs her friends. 🫢

πŸ‘‘ AUTHORS πŸ‘‘

  • Ira Weiny β€” ira.weiny@intel.com
  • Hal Rosenstock β€” halr@mellanox.com

okay that's the whole page, we ate and left no crumbs πŸ’…βœ¨ This was the saquery(8) page out of Open IB Diagnostics, dated 2017-08-21 β€” mwah, love u, bye! πŸŽ€πŸ¦‹πŸ’–

πŸ“¦ 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