Displaying hardware data on CentOS Linux hosts


I was reviewing the hardware configuration on one of my Centos Linux 5.3 hosts this past weekend, and was curious which chipset was in use and if the host supported the AMD virtualization extensions. To get a high level overview of the devices installed in the system, I looked through /etc/sysconfig/hwconf ( this file is populated at boot time with the current hardware configuration):

$ more /etc/sysconfig/hwconf

-
class: OTHER
bus: PCI
detached: 0
driver: shpchp
desc: "nVidia Corporation CK804 PCIE Bridge"
vendorId: 10de
deviceId: 005d
subVendorId: 0000
subDeviceId: 0000
pciType: 1
pcidom: 0
pcibus: 80
pcidev: e
pcifn: 0
-
.....

To see if the CPUs supported the AMD virtualization extensions, I poked around /proc/cpuinfo:

$ cat /proc/cpuinfo

processor : 0
vendor_id : AuthenticAMD
cpu family : 15
model : 37
model name : AMD Opteron(tm) Processor 254
stepping : 1
cpu MHz : 1000.000
cache size : 1024 KB
fpu : yes
fpu_exception : yes
cpuid level : 1
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 syscall nx mmxext fxsr_opt lm 3dnowext 3dnow pni lahf_lm
bogomips : 2008.99
TLB size : 1024 4K pages
clflush size : 64
cache_alignment : 64
address sizes : 40 bits physical, 48 bits virtual
power management: ts fid vid ttp

processor : 1
vendor_id : AuthenticAMD
cpu family : 15
model : 37
model name : AMD Opteron(tm) Processor 254
stepping : 1
cpu MHz : 2800.000
cache size : 1024 KB
fpu : yes
fpu_exception : yes
cpuid level : 1
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 syscall nx mmxext fxsr_opt lm 3dnowext 3dnow pni lahf_lm
bogomips : 5625.17
TLB size : 1024 4K pages
clflush size : 64
cache_alignment : 64
address sizes : 40 bits physical, 48 bits virtual
power management: ts fid vid ttp

After reviewing the processor details, I use lspci to extract some additional details from the PCI buses:

$ lspci -v |more

00:00.0 Memory controller: nVidia Corporation CK804 Memory Controller (rev a3)
Subsystem: Sun Microsystems Computer Corp. Unknown device 534a
Flags: bus master, 66MHz, fast devsel, latency 0
Capabilities: [44] HyperTransport: Slave or Primary Interface
Capabilities: [e0] HyperTransport: MSI Mapping

00:01.0 ISA bridge: nVidia Corporation CK804 ISA Bridge (rev a3)
Subsystem: Sun Microsystems Computer Corp. Unknown device 534a
Flags: bus master, 66MHz, fast devsel, latency 0
I/O ports at

00:01.1 SMBus: nVidia Corporation CK804 SMBus (rev a2)
Subsystem: Sun Microsystems Computer Corp. Unknown device 534a
Flags: 66MHz, fast devsel
I/O ports at 1000 [size=32]
I/O ports at 7000 [size=64]
I/O ports at 7040 [size=64]
Capabilities: [44] Power Management version 2

Once I looked through the lspci output, I ran dmidecode to gather the SMBIOS data (this has the chipset information):

$ dmidecode

Handle 0x0004, DMI type 4, 35 bytes.
Processor Information
Socket Designation: CPU0-Socket 940
Type: Central Processor
Family: Opteron
Manufacturer: AMD
ID: 51 0F 02 00 FF FB 8B 07
Signature: Extended Family 0, Model 5, Stepping 1
Flags:
FPU (Floating-point unit on-chip)
VME (Virtual mode extension)
DE (Debugging extension)
PSE (Page size extension)
TSC (Time stamp counter)
MSR (Model specific registers)
PAE (Physical address extension)
MCE (Machine check exception)
CX8 (CMPXCHG8 instruction supported)
APIC (On-chip APIC hardware supported)
SEP (Fast system call)
MTRR (Memory type range registers)
PGE (Page global enable)
MCA (Machine check architecture)
CMOV (Conditional move instruction supported)
PAT (Page attribute table)
PSE-36 (36-bit page size extension)
CLFSH (CLFLUSH instruction supported)
MMX (MMX technology supported)
FXSR (Fast floating-point save and restore)
SSE (Streaming SIMD extensions)
SSE2 (Streaming SIMD extensions 2)
Version: AMD
Voltage: 1.2 V
External Clock: 200 MHz
Max Speed: 3000 MHz
Current Speed: 2800 MHz
Status: Populated, Enabled
Upgrade: None
L1 Cache Handle: 0x0008
L2 Cache Handle: 0x0009
L3 Cache Handle: Not Provided
Serial Number: Not Specified
Asset Tag: Not Specified
Part Number: Not Specified

I like the fact that dmidecode breaks down the processor flags for you, since it saved me a round-trip to the kernel source code. I found exactly what I needed in the output above, and am now off to purchase another machine (one that has 2 PCI-X slots and virtualization extensions) for my lab.

This article was posted by Matty on 2009-04-09 12:34:00 -0400 -0400