Purpose: Suppose you get a new computer or a machine without much documentation and you would like to know as much as possible regarding the hardware that is there on the system like CPU, Memory, North Bridge, South Bridge, PCI devices, USB devices, Super I/O, BIOS, etc. There are some very good utilities in Linux which will tell exactly what kind of hardware is there. We will cover 10 such hardware utilities in this post.

So let’s get started…

Utility 1: lspci

This is one of the best utility to get basic and important information out of your computer. As per package’s description page:

This package contains various utilities for inspecting and setting of devices connected to the PCI bus.

Basically everything that is on the North Bridge (PCI bus) is being listed here. You can install this utility by installing pciutils package.

To install:

# apt-get install pciutils

and then execute:

# lspci

Output:

00:00.0 RAM memory: nVidia Corporation MCP61 Memory Controller (rev a1)
00:01.0 ISA bridge: nVidia Corporation MCP61 LPC Bridge (rev a2)
00:01.1 SMBus: nVidia Corporation MCP61 SMBus (rev a2)
00:01.2 RAM memory: nVidia Corporation MCP61 Memory Controller (rev a2)
00:02.0 USB Controller: nVidia Corporation MCP61 USB Controller (rev a3)
00:02.1 USB Controller: nVidia Corporation MCP61 USB Controller (rev a3)
00:04.0 PCI bridge: nVidia Corporation MCP61 PCI bridge (rev a1)
00:05.0 Audio device: nVidia Corporation MCP61 High Definition Audio (rev a2)
00:06.0 IDE interface: nVidia Corporation MCP61 IDE (rev a2)
00:07.0 Bridge: nVidia Corporation MCP61 Ethernet (rev a2)
00:08.0 IDE interface: nVidia Corporation MCP61 SATA Controller (rev a2)
00:09.0 PCI bridge: nVidia Corporation MCP61 PCI Express bridge (rev a2)
00:18.0 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] HyperTransport Technology Configuration
00:18.1 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Address Map
00:18.2 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] DRAM Controller
00:18.3 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Miscellaneous Control
02:00.0 VGA compatible controller: nVidia Corporation GeForce 8500 GT (rev a1)
#

Utility 2: lshw

The 2nd utility is called lshw. As per package’s description page:

A small tool to provide detailed information on the hardware configuration of the machine. It can report exact memory configuration, firmware version, mainboard configuration, CPU version and speed, cache configuration, bus speed, etc. on DMI-capable x86 systems, on some PowerPC machines (PowerMac G4 is known to work) and AMD64.

To install:

# apt-get install lshw

and then execute:

# lshw > hardware.txt

We redirect all the output from lshw to a text file (hardware.txt) so that we can review it later as it does generate a lot of extra information.

Utility 3: dmidecode

This utility gives us information regarding hardware components, their serial numbers and BIOS revision. As per package’s man page:

The Desktop Management Interface provides a standardized description of a computer’s hardware, including characteristics such as BIOS serial number and hardware connectors. dmidecode provides a dump of the DMI data available from the BIOS. It is used as a back-end tool by other hardware detection programs.

To install:

# apt-get install dmidecode

and then execute:

# dmidecode > dmi.txt

Again even this utility produces a big report so it is better to redirect it to a file.

Note: The 3rd utility somewhat depends on BIOS implementation regarding the DMI/SMBIOS data. On some computer I have seen that this utility fails to display anything because the BIOS does not have DMI implementation.

Utility 4: x86info

This utility gives specific information about your CPUs in the system and their supported features. For example, with this utility you can say whether your machine is a 32-bit or a 64-bit capable system. As per package’s description page:

x86info displays diagnostic information about the CPUs fitted to i386 compatible systems. This includes information on the CPU cache configuration, speed and supported features.

To install:

# apt-get install x86info

and then execute:

# x86info

Output:

x86info v1.21.  Dave Jones 2001-2007
Feedback to <davej@redhat.com>.
Found 2 CPUs
--------------------------------------------------------------------------
CPU #1
/dev/cpu/0/cpuid: No such file or directory
Family: 15 Model: 107 Stepping: 2
CPU Model : Unknown CPU
Processor name string: AMD Athlon(tm) 64 X2 Dual Core Processor 5600+
Feature flags:
fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflsh mmx fxsr sse sse2 ht sse3 cmpxchg16b
Extended feature flags:
fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 nx mmxext mmx fxsr ffxsr rdtscp lm 3dnowext 3dnow lahf/sahf CmpLegacy svm ExtApicSpace LockMovCr0 3dnowPref
SVM: revision 1, 64 ASIDs, lbrVirt
Address Size: 48 bits virtual, 40 bits physical
The physical package has 2 of 2 possible cores implemented.
--------------------------------------------------------------------------
CPU #2
Family: 15 Model: 107 Stepping: 2
CPU Model : Unknown CPU
Processor name string: AMD Athlon(tm) 64 X2 Dual Core Processor 5600+
Feature flags:
fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflsh mmx fxsr sse sse2 ht sse3 cmpxchg16b
Extended feature flags:
fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 nx mmxext mmx fxsr ffxsr rdtscp lm 3dnowext 3dnow lahf/sahf CmpLegacy svm ExtApicSpace LockMovCr0 3dnowPref
SVM: revision 1, 64 ASIDs, lbrVirt
Address Size: 48 bits virtual, 40 bits physical
The physical package has 2 of 2 possible cores implemented.
--------------------------------------------------------------------------
WARNING: Detected SMP, but unable to access cpuid driver.
Used Uniprocessor CPU routines. Results inaccurate.

Utility 5: hardinfo

This is one of my favorite utility and also it displays information graphically something like Window’s Device Manager. As per package’s description page:

HardInfo is a small application that displays information about your hardware and operating system. Currently it knows about PCI, ISA PnP, USB, IDE, SCSI, Serial and parallel port devices.

To install:

# apt-get install hardinfo

and then execute:

# hardinfo

Output:

Hardware information

Hardware information

Utility 6: hwinfo

This is another good utility which gives detailed information about your hardware in the system. This tool was originally used in SuSE Linux. As per package’s description page:

hwinfo collects information about the hardware installed on a system. Among others, libhd contains information about cdrom, zip, floppy, disks and partitions, network card, graphics card, monitor, camera, mouse, sound, pppoe, isdn, modem, printer, scanner, bios, cpu, usb, memory and smp.

To install:

# apt-get install hwinfo

and then execute:

# hwinfo > hwinfo.txt

Utility 7: biosdecode

This utility is specifically for getting information regarding BIOS and it’s features like SMBIOS/DMI, PNP< ACPI, etc. This utility is a part of the dmidecode package. As per man page:

biosdecode  parses  the BIOS memory and prints information about all structures (or entry points) it knows of.

To execute:

# biosdecode

Output:

SMBIOS 2.4 present.
Structure Table Length: 2003 bytes
Structure Table Address: 0x000F0100
Number Of Structures: 36
Maximum Structure Size: 244 bytes
ACPI 1.0 present.
OEM Identifier: GBT
RSD Table 32-bit Address: 0x7FFF3000
BIOS32 Service Directory present.
Revision: 0
Calling Interface Address: 0x000FB070
PNP BIOS 1.0 present.
Event Notification: Not Supported
Real Mode 16-bit Code Address: F000:BCC8
Real Mode 16-bit Data Address: F000:0000
16-bit Protected Mode Code Address: 0x000FBCA0
16-bit Protected Mode Data Address: 0x000F0000
PCI Interrupt Routing 1.0 present.
Router ID: 00:00.0
Exclusive IRQs: 5 10 11
Slot Entry 1: ID 00:04, slot number 1
Slot Entry 2: ID 00:09, slot number 2
Slot Entry 3: ID 00:0b, slot number 3
Slot Entry 4: ID 00:0c, slot number 4
Slot Entry 5: ID 01:06, slot number 5
Slot Entry 6: ID 01:07, slot number 6
Slot Entry 7: ID 00:09, slot number 7
Slot Entry 8: ID 00:0b, slot number 8
Slot Entry 9: ID 00:0c, slot number 9
Slot Entry 10: ID 00:01, on-board
Slot Entry 11: ID 00:02, on-board
Slot Entry 12: ID 00:05, on-board
Slot Entry 13: ID 00:05, on-board
Slot Entry 14: ID 00:07, on-board
Slot Entry 15: ID 00:08, on-board
#

Utility 8: superiotool

As the name suggests, this utility can detect the Super I/O chip on your computer, tell you at which configuration port it is located and can dump all the register contents. Also the Super I/O chip is generally on the South Bridge of your computer. This tool was developed to be used by the coreboot project.

To install:

# apt-get install superiotool

and then execute:

# superiotool

Output:

superiotool r3125
Found ITE IT8716F (id=0x8716, rev=0x3) at 0x2e

Utility 9: lsusb

This utility is specifically to get information about your USB devices attached to the system just like lspci was for all the devices attached to your system. As per package’s description page:

To install:

# apt-get install usbutils

and then execute:

# lsusb -v usb.txt

or to get shorter version of the output give:

# lsusb

Output:

Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

Utility 10: hwdata

Ok, last but not the least. Although we call it as a utility, there is no executable attached with it. It only installs some configuration files which helps other hardware detection utility to give correct information.

That’s it. Hopefully all the above utility will help you in getting almost any kind of hardware information about your system even without opening the system. Also I high recommend that you read the man pages of these utilities to unleash more useful features and power of these utilities.

Happy Hardware’ing!

Be Sociable, Share!