Read GPU Topology#

Query one GPU when choosing CPUs or peer GPUs for a workload:

$ dcgmi topo --gpuid 0

The report contains:

CPU Core Affinity

CPU cores local to the GPU. The report does not bind the process to those cores.

To GPU <id>

The PCIe relationship to another GPU, such as an on-board switch, one or more PCIe switches, a PCIe host bridge, or a CPU-level link.

NVLink

When present, the number of direct links and GPU-local port IDs in that GPU-to-GPU relationship.

Use a group query after selecting all GPUs considered for a workload:

$ dcgmi topo --group <group-id>

The group view summarizes CPU affinity, whether all members are NUMA-optimal, and the slowest PCIe relationship among their pairs. It does not show all pairwise detail, so return to per-GPU queries when the summary is unexpected.

Topology can be unsupported. Even when available, it describes relationships known to DCGM; it does not predict application performance, prove that every link is currently active, or measure bandwidth. Use link status for current port state and diagnostics for an active path test.

Watch Traffic and Error Fields#

Use field monitoring when the concise report does not provide the entity, field set, cadence, or history needed by the investigation.

DCGM 4.6 provides NVLink COUNT fields in these ranges:

  • 1200-1219 for packet, byte, and error counters; and

  • 1404-1419 for FEC history buckets.

Use dcgmi dmon --list or Field Identifiers for exact names, types, and units. Representative fields include transmitted packets (1200), transmitted bytes (1201), received packets (1202), received bytes (1203), malformed received packets (1204), received packets dropped because of buffer overrun (1205), and effective errors (1219).

The fields in these two ranges require NVLink 5 or newer. On NVLink 4 and older, both GPU-level and link-entity queries return N/A. The following examples assume supported NVLink 5+ hardware and compare transmitted and received packet totals.

For a GPU entity, DCGM requests NVML’s aggregate across all links:

$ dcgmi dmon --field-id 1200,1202 --entity-id gpu:0

The same fields can also be read for an individual link entity:

$ dcgmi dmon --field-id 1200,1202 \
    --entity-id gpu_link:0:5

Range selectors make a port comparison concise:

$ dcgmi dmon --field-id 1200,1202 \
    --entity-id 'gpu_link:0:{0-5}'

A field’s presence in the catalogue does not guarantee support for a particular GPU or link; unsupported selections also display N/A.

Apply normal counter rules: take a baseline, preserve timestamps, and compute a delta over a defined interval. If traffic is needed as a rate, divide the counter delta by the elapsed time between the two samples; do not divide by the requested watch interval unless the timestamps confirm it.

Further Reading#