Linux Hardware Info

linux hardware listing image

Finding information about the hardware installed on your Linux server is easier then you might think.
The Linux server comes installed with some very nice command line tools to help you list all the linux hardware information you need.
lets start with the basic tool: dmesg

Startup Log

you can either run the command dmesg or read the log itself at: “cat /var/log/dmesg”

this logs will show you the bootup process messages your Linux server had sent out in its last boot, and all the hardware it had recognized. a lot more info is listed – for example the network card running state:

[root@localhost /]# dmesg | grep eth
eth0: registered as PCnet/FAST III 79C973
eth0: link up, 100Mbps, full-duplex
eth0: no IPv6 routers present

this command gives you the network card status and if its in full or half duplex mode, for example.

List PCI Devices

the command lspci will list your PCI devices on your system – mainly information about which motherboard is installed, what is your network card maker and which video device.
sample output:

[root@localhost /]# lspci
00:00.0 Host bridge: Intel Corporation 440FX – 82441FX PMC [Natoma] (rev 02)
00:01.0 ISA bridge: Intel Corporation 82371SB PIIX3 ISA [Natoma/Triton II]
00:01.1 IDE interface: Intel Corporation 82371AB/EB/MB PIIX4 IDE (rev 01)
00:02.0 VGA compatible controller: InnoTek Systemberatung GmbH VirtualBox Graphics Adapter
00:03.0 Ethernet controller: Advanced Micro Devices [AMD] 79c970 [PCnet32 LANCE] (rev 40)

List Bios Info

the command dmidecode will list the SMBios info,
which should give you a lot of details on the installed Bios – but its not 100% reliable,
it wont only tell you what exactly is installed, but it might also tell you whats the fastest CPU that can be attached to the mother board, not what really is there.
a sample output:

Handle 0x0000, DMI type 0, 20 bytes.
BIOS Information
Vendor: innotek GmbH
Version: VirtualBox
Release Date: 12/01/2006
Address: 0xE0000
Runtime Size: 128 kB
ROM Size: 128 kB
ISA is supported
PCI is supported
Boot from CD is supported
Selectable boot is supported
8042 keyboard services are supported (int 9h)
CGA/mono video services are supported (int 10h)
ACPI is supported

List All Your Linux Hardware Devices

a very thorough listing of all the devices attached to the computer including the Plug-n-Play devices is listed through the command lshal, for example everything you wanted to know about my mouse and more:

udi = ‘/org/freedesktop/Hal/devices/pnp_PNP0f03′
info.udi = ‘/org/freedesktop/Hal/devices/pnp_PNP0f03′  (string)
linux.subsystem = ‘pnp’  (string)
linux.hotplug_type = 1  (0x1)  (int)
info.product = ‘Microsoft PS/2-style Mouse’  (string)
pnp.description = ‘Microsoft PS/2-style Mouse’  (string) = ‘PNP0f03′  (string)
info.linux.driver = ‘i8042 aux’  (string)
info.parent = ‘/org/freedesktop/Hal/devices/computer’  (string)
info.bus = ‘pnp’  (string)
linux.sysfs_path_device = ‘/sys/devices/pnp0/00:04′  (string)
linux.sysfs_path = ‘/sys/devices/pnp0/00:04′  (string)

Test Harddisk Transfer Speed

this cute command line will tell you whats your hard-disk speed is, of course you need to know what hard-disks you have first:

[root@localhost /]# hdparm -t -T /dev/hda
Timing cached reads:   7680 MB in  1.99 seconds = 3868.01 MB/sec
Timing buffered disk reads:  148 MB in  3.00 seconds =  49.33 MB/sec

USB Devices

just like lspci the command lsusb will list your USB devices:

[root@localhost /]# lsusb
Bus 001 Device 001: ID 0000:0000
Bus 002 Device 001: ID 0000:0000

So these are some good command line tools to list all you Linux Hardware info, but check out my post about Linux Server Information which explains how to use cfg2html to easily extract all this information and more at once.

Image by Jeff Kubina

Technorati Tags: , ,

3 thoughts on “Linux Hardware Info”

  1. dmidecode is also useful for bunch of other stuff like listing the available memory dimms and memory type: dmidecode –type memory.
    ‘dmidecode –type’ will give you a list of what you can do with it.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>