jump to navigation

Exploring a Linux box : List hardware and Bios information from the terminal December 15, 2010

Posted by Tournas Dimitrios in Linux.

This article will outline two command line utilities that will collect information about the architecture and infrastructure of a computer . Depending on the command line arguments provided to these utilities , the information can be very detailed . The first tool is installed by default on CentOs , while the second tool must be separately downloaded from EPEL repository .

  1. dmidecode
  2. lshw

dmidecode :

This  tool  is used for dumping a computer’s DMI (some say SMBIOS) table contents in a human-readable format. This table contains a description of the system’s hardware components, as well as other useful pieces of information such as serial numbers and BIOS revision. Thanks to this table, you can  retrieve  this information without having to probe for the actual hardware.  While this is a good point in terms of report speed and safeness, this also makes the presented information possibly unreliable.

The DMI table doesn’t only describe what the system is currently made of, it also can report the possible evolutions (such as the fastest supported CPU or the maximal amount of memory supported).

SMBIOS  stands  for  System Management BIOS, while DMI stands for Desktop Management Interface. Both standards are tightly related and developed by the DMTF (Desktop Management Task Force).

As you run it, dmidecode will try to locate the DMI table. If it succeeds, it will then parse this table and display it . Each record has a unique identifier  “handler ” and a specification  number that defines different types of elements  a computer  can  be  made of . We can filter out , the information through  command line  arguments . These arguments can be :  “type keyword” or   ” type number ”

–>  dmidecode  –type  [keyword |  number ] .

You need to pass dmidecode following keywords:

  • bios
  • system
  • baseboard
  • chassis
  • processor
  • memory
  • cache
  • connector
  • slot

Or you need to pass  one of the following dmidecode numbers

# Type Short Description
1 System
2 Base Board
3 Chassis
4 Processor
5 Memory Controller
6 Memory Module
7 Cache
8 Port Connector
9 System Slots
10 On Board Devices
11 OEM Strings
12 System Configuration Options
13 BIOS Language
14 Group Associations
15 System Event Log
16 Physical Memory Array
17 Memory Device
18 32-bit Memory Error
19 Memory Array Mapped Address
20 Memory Device Mapped Address
21 Built-in Pointing Device
22 Portable Battery
23 System Reset
24 Hardware Security
25 System Power Controls
26 Voltage Probe
27 Cooling Device
28 Temperature Probe
29 Electrical Current Probe
30 Out-of-band Remote Access
31 Boot Integrity Services
32 System Boot
33 64-bit Memory Error
34 Management Device
35 Management Device Component
36 Management Device Threshold Data
37 Memory Channel
38 IPMI Device
39 Power Supply

So  dmidecode  –type  0 is equal to  dmidecode –type bios . Both commands will display information about the installed Bios . dmidecode is a very powerful utility , please  read the man page for more details .

lshw :

This utility extracts detailed information on the hardware configuration of the machine. It can report exact memory configuration, firmware version, main board configuration, CPU version and speed, cache configuration, bus speed, etc. on DMI-capable x86 or IA-64 systems and on some PowerPC machines.It currently supports DMI (x86 and IA-64 only), OpenFirmware device tree (PowerPC only), PCI/AGP, CPUID (x86), IDE/ATA/ATAPI, PCMCIA (only tested on x86), SCSI and USB. This tool is not a default utility on Red hat based distributions , so it must installed separately . My prefered repository for my CentOs box is EPEL , so  yum install  lshw , will install this utility on my box  (EPEL is on my repolist ) . For more details read my previous article here .


No comments yet — be the first.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s