How to see number of pci-slots
Alexander Apprich
a.apprich at science-computing.de
Tue Jan 18 10:57:30 UTC 2005
Mitch,
Nifty Hat Mitch wrote:
> On Mon, Jan 17, 2005 at 02:49:24PM +0100, Alexander Apprich wrote:
>
>>Phil Schaffner wrote:
>>
>>>On Mon, 2005-01-17 at 12:01 +0100, Alexander Apprich wrote:
>>>
>>>>Kam Leo wrote:
>>>>
>>>>>On Mon, 17 Jan 2005 10:01:16 +0100, Alexander Apprich
>>>>>
>>>>>>Roger Grosswiler wrote:
>>>>>>
>>>>>>>Alexander Apprich schrieb:
>>>>>>>
>>>>>>>>Roger Grosswiler wrote:
>
>
>
>>>>>>>>>I would like to see all pci-slots on a system via shell, not only the
>>>>>>>>>used slots.
>
> ....
>
>>>> root at elmstreet / # dmidecode | grep PCI | wc -l
>>>> 7
>
> ....
>
>>Well, Roger asked for number of PCI-Slots...
>
>
> I am not sure that there is a way to do exactly what
> I think the OP is asking.
>
Well, as he didn't say anything it must be what he asked for :-)
> In some MB the difference between 1, 2, 3 and 4 PCI slots
> is simply the presence of a connector. i.e. The chip set
> can support more than are wired on the PWB.
>
As I said, this is allways possible.
> It is possible to count the bridge2pci interfaces but
> empty pci slots cannot be seen as far as I know (jtag?).
>
> "Dmidecode reports information about your system's hardware as
> described in your system BIOS according to the SMBIOS/DMI standard
> (see a sample output). This information typically includes system
> manufacturer, model name, serial number, BIOS version, asset tag as
> well as a lot of other details of varying level of interest and
> reliability depending on the manufacturer. This will often include
> usage status for the CPU sockets, expansion slots (e.g. AGP, PCI,
> ISA) and memory module slots, and the list of I/O ports
> (e.g. serial, parallel, USB)."
>
> Since dmidecode is getting info from the BIOS it is possible for the
> vendor to know what the build list for the MB is and return the right
> info, but as far as I know software cannot "see" empty slots.
>
Yep, it also possible that there is no info availible
apprich at sagnix apprich $ sudo /usr/local/bin/dmidecode
SYSID present.
RSD PTR found at 0xF6D60.
OEM PTLTD
PNP BIOS present.
apprich at sagnix apprich $ cat /etc/issue | head -n 1
Red Hat Linux release 9 (Shrike)
> Note also that many MBs have multiple PCI busses. Some are dedicated
> for resources on the MB. One or more will have connectors to plug
> stuff into.
>
I agree that it may no work in 100% of all cases, but most of the time
it works :-)
apprich at c7po methods $ cat pci_slots
#!/usr/local/bin/perl -w
use strict;
use warnings;
my $dmi = "/usr/local/bin/dmidecode";
my $host = "$ENV{HOST}";
my $pcicount = 0;
open IN, "$dmi|" or die "Cannot execute $dmi\n";
foreach my $key (<IN>) {
next if ! ( $key =~ m/^.*Type\: 32bit.*PCI.*$/i );
$pcicount++
}
Found 6 PCI Slots on altels
Found 6 PCI Slots on aragorn
Found 6 PCI Slots on avalon
Found 5 PCI Slots on beastie
Found 6 PCI Slots on bellona
Found 6 PCI Slots on bizkit
Found 6 PCI Slots on blondel
Found 6 PCI Slots on cantor
Found 5 PCI Slots on deneb
Found 6 PCI Slots on earth
Found 5 PCI Slots on elise
Found 6 PCI Slots on elmstreet
Found 5 PCI Slots on gerda
Found 7 PCI Slots on ginga
Found 5 PCI Slots on hydra
Found 5 PCI Slots on inti
Found 5 PCI Slots on ivar
Found 6 PCI Slots on kai
Found 6 PCI Slots on legolas
Found 6 PCI Slots on magellan
Found 6 PCI Slots on marica
Found 6 PCI Slots on nebula
Found 6 PCI Slots on photonix
Found 6 PCI Slots on sindibad
Found 4 PCI Slots on terminalix
Found 6 PCI Slots on titan
Found 6 PCI Slots on titania
Found 6 PCI Slots on vanquish
Found 5 PCI Slots on wurzelausix
I checked them all and dmidecode was right in all cases.
Alex
More information about the fedora-list
mailing list