Date: Sat, 29 Sep 2012 20:54:01 +0200 From: Polytropon <freebsd@edvax.de> To: saeedeh motlagh <saeedeh.motlagh@gmail.com> Cc: freebsd-questions <freebsd-questions@freebsd.org> Subject: Re: find slot number and number of ports for each card Message-ID: <20120929205401.ac331836.freebsd@edvax.de> In-Reply-To: <CAN%2BS=WAZ1VP06_HytYx9xVQ0eu949QRoB1Y7Yp0zgYDYP2nYJg@mail.gmail.com> References: <CAN%2BS=WAZ1VP06_HytYx9xVQ0eu949QRoB1Y7Yp0zgYDYP2nYJg@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 29 Sep 2012 18:07:56 +0330, saeedeh motlagh wrote: > hello all > > i want to have statistics about my hardware specially the type of card > that are installed on my system, the number of ports that each card > has and the slot number which cards are installed. i can find the > slot number by tracing the output of dmesg but it's time consuming > job. You can use "pciconf -lv" to get a beter output for PCI cards. Note that this list does also contain "integrated components". Sadly, there is no direct relation to which "hardware slots" are occupied, because there is no real standard for communcating the physical layout of the machine to the OS, either through the BIOS, ACPI, or "more directly" by the OS itself. See "man pciconf" for details. Some non-PC systems (such as EISA-based computers, some Sun hardware, or the AS/400, or nearly anything from the mainframe sector) have means to "directly query" hardware resources. Today's cheap commodity consumer crap (sorry) doesn't have this feature. > more over, i don't know how to find the number of ports that each > card has. A lot of this data can be obtained by using "pciconf -lv". Here's an example output for a graphics card: vgapci0@pci0:2:0:0: class=0x030000 card=0x06201462 chip=0x039210de rev=0xa1 hdr=0x00 vendor = 'NVIDIA Corporation' device = 'NVIDIA GeForce 7600 GS (G73)' class = display subclass = VGA Of course, _what_ "pci0:2:0:0" is, depends on the mainboard in use. This particular machine also has a TV tuner card at "pci0:0:9:0" and "pci0:0:9:1", and a network card at "pci0:0:10:0". _Where_ those are located (which "hardware slots") is not obvious, as there aren't even _5_ of them on the mainboard! It cannot easily be concluded, especially considering the common lack of lower-level documentation. -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120929205401.ac331836.freebsd>