This is our 4th post on finding hardware details in Linux. Till this point we explored different ways to display complete hardware available in a system. We already explored following posts.

Get BIOS, Firmware, Hardware And Drivers Details in Linux/Unix

What is dmesg command and how to use it in Linux/Unix?

Find hardware info with lshw, hardinfo, sysinfo Linux/Unix commands

From today on words we will see how to find details of different hardware in detail. We will cover hardware like RAM, CPU, BIOS, Disks, Optical drives, USB devices, PCI cards etc. In this series the post is about finding PCI related information in a Linux machine.

PCI(Peripheral Component Interconnect) is a standardized local bus for attaching different hardware to motherboard. Many devices such as Network cards, modems, sound cards are attached to these PCI sa lots in older machines and still we are using PCI sa lots but in near future they will be absolute. These PCI devices are directly integrated on to motherboard or extended using USB sa lots.

Some times it’s required to find hardware attached to PCI sa lots. To find these details we can use an inbuilt command “lspci” to find hardware attached to PCI sa lots. To get more out of lspci command, we have to use it as a super user.  lspci command display hardware details like

Card bus speeds
Card IRQ settings
Card AGP settings

Learn lspci command with examples.

Example1 : To find all the hardware attached to PCI sa lots in a given machine.

lspci

Output:

00:00.0 Host bridge: Intel Corporation 2nd Generation Core Processor Family DRAM Controller (rev 09)
00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09)
00:16.0 Communication controller: Intel Corporation 6 Series/C200 Series Chipset Family MEI Controller #1 (rev 04)
00:1a.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #2 (rev 04)
00:1b.0 Audio device: Intel Corporation 6 Series/C200 Series Chipset Family High Definition Audio Controller (rev 04)
00:1c.0 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 1 (rev b4)
00:1c.2 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 3 (rev b4)
00:1c.4 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 5 (rev b4)
00:1d.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #1 (rev 04)
00:1f.0 ISA bridge: Intel Corporation HM65 Express Chipset Family LPC Controller (rev 04)
00:1f.2 SATA controller: Intel Corporation 6 Series/C200 Series Chipset Family 6 port SATA AHCI Controller (rev 04)
00:1f.3 SMBus: Intel Corporation 6 Series/C200 Series Chipset Family SMBus Controller (rev 04)
01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168 PCI Express Gigabit Ethernet controller (rev 06)
02:00.0 Network controller: Atheros Communications Inc. AR9285 Wireless Network Adapter (PCI-Express) (rev 01)
03:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS5209 PCI Express Card Reader (rev 01)

Format of lspci command follow below options

03:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS5209 PCI Express Card Reader (rev 01)

Field 1        Field2                             Filed3

Field 1: PCI bus sa lot number
Field 2: PCI sa lot name
Field 3: Name of device attached and it's manufactured company name.

Example 2: Not able to distungush different hardwares attached to the machine use -vmm option to display lspci command output.

lspci -vmm

Output:

Sa lot:    00:00.0
Class:    Host bridge
Vendor:    Intel Corporation
Device:    2nd Generation Core Processor Family DRAM Controller
SVendor:    Hewlett-Packard Company
SDevice:    Device 3672
Rev:    09

Sa lot:    00:02.0
Class:    VGA compatible controller
Vendor:    Intel Corporation
Device:    2nd Generation Core Processor Family Integrated Graphics Controller
SVendor:    Hewlett-Packard Company
SDevice:    Device 3672
Rev:    09

Sa lot:    00:16.0
Class:    Communication controller
Vendor:    Intel Corporation
Device:    6 Series/C200 Series Chipset Family MEI Controller #1
SVendor:    Hewlett-Packard Company
SDevice:    Device 3672
Rev:    04

Sa lot:    00:1a.0
Class:    USB controller
Vendor:    Intel Corporation
Device:    6 Series/C200 Series Chipset Family USB Enhanced Host Controller #2
SVendor:    Hewlett-Packard Company
SDevice:    Device 3672
Rev:    04
ProgIf:    20

Sa lot:    00:1b.0
Class:    Audio device
Vendor:    Intel Corporation
Device:    6 Series/C200 Series Chipset Family High Definition Audio Controller
SVendor:    Hewlett-Packard Company
SDevice:    Device 3672
Rev:    04

Example 3:  Display PCI sa lot information in tree format

	lspci -t

Output:

-[0000:00]-+-00.0
           +-02.0
           +-16.0
           +-1a.0
           +-1b.0
           +-1c.0-[01]----00.0
           +-1c.2-[02]----00.0
           +-1c.4-[03-08]----00.0
           +-1d.0
           +-1f.0
           +-1f.2
           -1f.3

 

Example 4: Display PCI devices atached their speeds, IRQ assigned Kernel drivers and modules etc.

lspci -v

Output:

00:00.0 Host bridge: Intel Corporation 2nd Generation Core Processor Family DRAM Controller (rev 09)
Subsystem: Hewlett-Packard Company Device 3672
Flags: bus master, fast devsel, latency 0
Capabilities: <access denied>

00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09) (prog-if 00 [VGA controller])

Subsystem: Hewlett-Packard Company Device 3672
Flags: bus master, fast devsel, latency 0, IRQ 44
Memory at c0000000 (64-bit, non-prefetchable) [size=4M]
Memory at b0000000 (64-bit, prefetchable) [size=256M]
I/O ports at 4000 [size=64]
Expansion ROM at <unassigned> [disabled]
Capabilities: <access denied>
Kernel driver in use: i915
Kernel modules: i915

00:16.0 Communication controller: Intel Corporation 6 Series/C200 Series Chipset Family MEI Controller #1 (rev 04)
Subsystem: Hewlett-Packard Company Device 3672
Flags: bus master, fast devsel, latency 0, IRQ 43
Memory at c2604000 (64-bit, non-prefetchable) [size=16]
Capabilities: <access denied>
Kernel driver in use: mei
Kernel modules: mei

00:1a.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #2 (rev 04) (prog-if 20 [EHCI])
Subsystem: Hewlett-Packard Company Device 3672
Flags: bus master, medium devsel, latency 0, IRQ 16
Memory at c2609000 (32-bit, non-prefetchable) [size=1K]
Capabilities: <access denied>
Kernel driver in use: ehci_hcd

In our next post we will see different hardware devices like USB’s, RAM, Processor, Graphic cards etc.

The following two tabs change content below.
Mr Surendra Anne is from Vijayawada, Andhra Pradesh, India. He is a Linux/Open source supporter who believes in Hard work, A down to earth person, Likes to share knowledge with others, Loves dogs, Likes photography. He works as Devops Engineer with Taggle systems, an IOT automatic water metering company, Sydney . You can contact him at surendra (@) linuxnix dot com.