Which Nic is in which PCI slot ?

Andrew Mather mathera at gmail.com
Thu Jul 21 07:01:51 UTC 2005


Message: 17
Date: Thu, 21 Jul 2005 08:12:15 +0200 (CEST)
From: "Roger Grosswiler" <roger at gwch.net>
>Subject: Re: Which Nic is in which PCI slot ?
>To: "For users of Fedora Core releases" <fedora-list at redhat.com>
>Message-ID: <29887.62.2.21.164.1121926335.squirrel at www.gwch.net>
>Content-Type: text/plain;charset=iso-8859-1
>
> >On Wed, 2005-07-20 at 23:06, William Hooper wrote:
>>
>> > >Does anyone know of a single command I can use to list which nic is in
>> > >which slot in multi-nic machines ?
>> >
>> >> lspci and cat /proc/pci list the type of card (and in the /proc/pci
>> >case,
>> > >the interrupt) and ifconfig lists the nics and their other details,
>> >> incluing interrupt, so I can figure it out.
>>>
>> >ifconfig also lists MAC address.  You might have to put a visible label
>> >on
>> >the NIC with the MAC, though, because most any more seem to be labeled
>> >on
>>> the PCB.
>>
> >If you are at the machine you can always plug one nic at a time into a
>> hub/switch and run mii-tool to tell you which device link is up.
>>
> you can also try dmidecode, this should show you the ports.

Unfortunately, dmidecode didn't provide any useful info (for this
purpose anyway), although is is quite interesting ! ;-)

I can get what I need using cat /proc/pci and ifconfig, since IRQ is a
common field between the two and thus I can make the link.

However since there's 50+ nics involved here across the whole cluster,
I was hoping for a single command I could issue from the management
node that would provide both key bits of info (ie pci slot and eth*
details)

Looks like it's back to the printouts with a pen ! ;-(

(I'm sure I could script something up with awk and so forth, but by
the time I'd done that, it would have been quicker to do it manually
for 50 nics.  Maybe for 250 or more, the script would be worthwhile)

Thanks anyway

Andrew




More information about the fedora-list mailing list