Using lspci to poke Harware in Linux

Posted on 9:21 PM by Bharathvn

If you just generally want to find out more about your computer’s hardware, you can
use the following commands. The lspci command lists information about PCI devices on
your computer:

$ lspci List PCI hardware items
00:00.0 Host bridge: VIA Technologies, Inc. VT8375 [KM266/KL266] Host Bridge
00:01.0 PCI bridge: VIA Technologies, Inc. VT8633 [Apollo Pro266 AGP]
00:10.0 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1
00:11.0 ISA bridge: VIA Technologies, Inc. VT8235 ISA Bridge
00:12.0 Ethernet controller: VIA Technologies, Inc. VT6102 [Rhine-II]
01:00.0 VGA compatible controller: S3 Inc. VT8375 [ProSavage8 KM266/KL266]
...

$ lspci -v List PCI hardware items with more details

$ lspci -vv List PCI hardware items with even more details
Using the dmidecode command, you can display information about your computer’s hardware components, including information about what features are supported in the BIOS. Here is an example:

$ sudo dmidecode | less List hardware components

$ sudo dmidecode 2.7
SMBIOS 2.3 present.
32 structures occupying 919 bytes.
Table at 0x000F0100.
Handle 0x0000, DMI type 0, 20 bytes.
BIOS Information
Vendor: Award Software International, Inc.
Version: F2
Release Date: 10/06/2003
...
Processor Information
Socket Designation: Socket A
Type: Central Processor
Family: Athlon
Manufacturer: AMD
ID: 44 06 00 00 FF FB 83 01
Signature: Family 6, Model 4, Stepping 4
Flags:
FPU (Floating-point unit on-chip)
VME (Virtual mode extension)
DE (Debugging extension)

You can use the hdparm command to view and change information relating to your hard disk.

WARNING!
Although it’s safe to view information about features of your hard
disks, it can potentially damage your hard disk to change some of those settings.
Here are some examples of printing information about your hard disks:
$ sudo hdparm /dev/sda Display hard disk settings (SATA or SCSI drive)
/dev/sda:
IO_support = 0 (default 16-bit)
readonly = 0 (off)
readahead = 256 (on)
geometry = 30401/255/63, sectors = 488395055, start = 0

$ sudo hdparm /dev/hda Display hard disk settings (IDE drive)

$ sudo hdparm –I /dev/sda Display detailed drive information
/dev/sda:
ATA device, with non-removable media
Model Number: FUJITSU MPG3409AT E
Serial Number: VH06T190RV9W
Firmware Revision: 82C5