<div dir="auto">Does ibnetdiscover not help you?<div dir="auto"><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, 19 Sep 2023, 19:03 Michael DiDomenico, <<a href="mailto:mdidomenico4@gmail.com">mdidomenico4@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">does anyone know if there's a simple command to pull the neighbor of<br>
the an ib port? for instance, this horrible shell command line<br>
<br>
# for x in `ibstat | awk -F \' '/^CA/{print $2}'`; do iblinkinfo -C<br>
${x} -n 1 -l | grep `hostname -s`; done<br>
0x080069000000fbcc "SwitchX - Mellanox Technologies" 41134 29[ ]<br>
==( 4X 14.0625 Gbps Active/ LinkUp)==> 0x88e9a4ffff404704<br>
611 1[ ] "logs01 HCA-1" ( )<br>
0x88e9a4ffff404704 " logs01 HCA-1" 611 1[ ]<br>
==( 4X 14.0625 Gbps Active/ LinkUp)==> 0x080069000000fbcc<br>
41134 29[ ] "SwitchX - Mellanox Technologies" ( )<br>
0x080069000000fbdc "SwitchX - Mellanox Technologies" 41219 29[ ]<br>
==( 4X 14.0625 Gbps Active/ LinkUp)==> 0x88e9a4ffff404705<br>
10105 1[ ] "logs01 HCA-2" ( )<br>
0x88e9a4ffff404705 " logs01 HCA-2" 10105 1[ ]<br>
==( 4X 14.0625 Gbps Active/ LinkUp)==> 0x080069000000fbdc<br>
41219 29[ ] "SwitchX - Mellanox Technologies" ( )<br>
<br>
outputs what i need (though i only need the CA perspective), but it's<br>
going to be an atrocious effort in text parsing. would be nice if<br>
there was a nice simple command, preferably that outputs json, but<br>
that's likely wishful thinking<br>
_______________________________________________<br>
Beowulf mailing list, <a href="mailto:Beowulf@beowulf.org" target="_blank" rel="noreferrer">Beowulf@beowulf.org</a> sponsored by Penguin Computing<br>
To change your subscription (digest mode or unsubscribe) visit <a href="https://beowulf.org/cgi-bin/mailman/listinfo/beowulf" rel="noreferrer noreferrer" target="_blank">https://beowulf.org/cgi-bin/mailman/listinfo/beowulf</a><br>
</blockquote></div>