[ofa-general] Library routine for enumerating IB cards and GUIDS
Ira Weiny
weiny2 at llnl.gov
Wed Jul 1 17:57:12 PDT 2009
On Wed, 1 Jul 2009 15:42:45 -0600
Chris Worley <worleys at gmail.com> wrote:
> On Wed, Jul 1, 2009 at 3:23 PM, Hal Rosenstock<hal.rosenstock at gmail.com> wrote:
> > On Wed, Jul 1, 2009 at 4:16 PM, Chris Worley<worleys at gmail.com> wrote:
> >> I need a programmatic way to enumerate all IB cards in the system,
> >> i.e. their port GUIDs.
> >>
> >> What library/routines might I use, and which docs should I read
> >> concerning exposed routines?
> >
> > Is /sys/class/infiniband/*/ports/*/gids/0 sufficient ? The port GUIDs
> > are the low 64 bits. That's one way.
>
> I can definitely write scripts to collect the data... I was looking
> for "C" routines, other than "system" calls to scripts.
When you say system do you mean a single node (computer) or the entire IB
fabric? The former has been answered. If you mean the latter there is a new
libibnetdisc library in the infiniband-diags which provides C interfaces to
scan the fabric.
Ira
More information about the general
mailing list