Skip to content

Instantly share code, notes, and snippets.

@hzhangxyz
Created August 11, 2025 02:47
Show Gist options
  • Select an option

  • Save hzhangxyz/fc0706539d97621a0e96fde836ce59a0 to your computer and use it in GitHub Desktop.

Select an option

Save hzhangxyz/fc0706539d97621a0e96fde836ce59a0 to your computer and use it in GitHub Desktop.
check-for-ib-net
command:
for j in `seq 2 6`; do ip=192.168.0.$j; echo $ip; for i in `seq 0 7`; do id=`talosctl --nodes $ip ls /sys/class/infiniband/mlx5_$i --long | grep device | awk '{print $12}' | sed 's/\.\.\///g'`; echo $id; talosctl --nodes $ip cat /sys/bus/pci/devices/$id/class; done; echo; done;
output:
192.168.0.2
0000:29:00.0
0x020000
0000:3b:00.0
0x020000
0000:4b:00.0
0x020000
0000:5d:00.0
0x020000
0000:ab:00.0
0x020000
0000:bb:00.0
0x020000
0000:cb:00.0
0x020000
0000:db:00.0
0x020000
192.168.0.3
0000:29:00.0
0x020000
0000:3b:00.0
0x020000
0000:4b:00.0
0x020000
0000:5d:00.0
0x020000
0000:ab:00.0
0x020000
0000:bb:00.0
0x020000
0000:cb:00.0
0x020000
0000:db:00.0
0x020000
192.168.0.4
0000:29:00.0
0x020000
0000:3b:00.0
0x020000
0000:4b:00.0
0x020000
0000:5d:00.0
0x020000
0000:ab:00.0
0x020000
0000:bb:00.0
0x020000
0000:cb:00.0
0x020000
0000:db:00.0
0x020000
192.168.0.5
0000:29:00.0
0x020000
0000:3b:00.0
0x020000
0000:4b:00.0
0x020000
0000:5d:00.0
0x020000
0000:ab:00.0
0x020000
0000:bb:00.0
0x020000
0000:cb:00.0
0x020700
0000:db:00.0
0x020700
192.168.0.6
0000:29:00.0
0x020700
0000:3b:00.0
0x020700
0000:4b:00.0
0x020700
0000:5d:00.0
0x020700
0000:ab:00.0
0x020700
0000:bb:00.0
0x020700
0000:cb:00.0
0x020000
0000:db:00.0
0x020000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment