I’d be a bit surprised if any of my readers weren’t already aware of CPU-Z: it’s a very handy utility to run on a Windows PC when you are contemplating buying new RAM (and need to know what type of RAM your motherboard takes), or wondering whether your CPU has the hardware virtualisation extensions:
It has a couple of flaws, however. The first is that, like a lot of Windows freeware these days, you have to be careful during the installation process, because it will suggest by default to install the Ask toolbar and to change your browser’s home page. Why anyone, ever, thought that would be a good thing for a user to experience, I have never worked out -but it’s certainly annoying to me.
The second problem is that it’s a Wndows-only affair. If you want to check these sorts of hardware details when you’re running Linux, it’s not the tool for you!
So is there a Linux equivalent of CPU-Z?
Indeed there is -and, if you’re running Scientific Linux 6.1, at least, it’s already installed and you merely have to invoke it. The program is called dmidecode. It’s a text utility (none of your twittering GUIs here, thank you very much) which must be run as root (you’ll get ‘permission denied’ errors if you try running it as yourself). As root, therefore, issue this sort of command:
dmidecode | more
…and you’ll see stuff that looks like this:
[root@dirac ~]# dmidecode | more # dmidecode 2.10 SMBIOS 2.5 present. 27 structures occupying 3569 bytes. Table at 0x000FB520. Handle 0x0000, DMI type 0, 24 bytes BIOS Information Vendor: American Megatrends Inc. Version: V1.07 Release Date: 08/21/2009 Address: 0xF0000 Runtime Size: 64 kB ROM Size: 1024 kB Characteristics: ISA is supported PCI is supported PNP is supported APM is supported BIOS is upgradeable
…and so on and on (press Enter to step through the output line-by-line).
Pretty detailed stuff! It’s basically an entire dump of the information that CPU-Z displays on all of its separate tabs. Is there a way to break this output up into the same sort of separate ‘sections’, so that you only see data on, say, the mainboard, the CPU or the memory modules, as you direct?
Of course there is. Notice that in the output seen so far different parts of it are displayed as DMI Type x …in the above output, it was “DMI Type 0″, for example. Well, you can supply a DMI Type number to the dmidecode program as a run-time parameter, and only that section of the entire output will be displayed.
The bit about which system you own, for example, has DMI Type number 1, so this command:
dmidecode --type 1
…only returns this output:
[root@dirac ~]# dmidecode --type 1 # dmidecode 2.10 SMBIOS 2.5 present. Handle 0x0001, DMI type 1, 27 bytes System Information Manufacturer: Hewlett-Packard Product Name: HP dx2810 MT Version: 103C Serial Number: xxxxxxxxx UUID: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXX Wake-up Type: Power Switch SKU Number: AB123CD#EFG Family: 103C_53307F
The CPU bits and pieces are DMI type 4, so the command dmidecode –type 4 yields just this:
Handle 0x0004, DMI type 4, 40 bytes Processor Information Socket Designation: CPU 1 Type: Central Processor Family: Other Manufacturer: Intel ID: 7A 06 01 00 FF FB EB BF Signature: Type 0, Family 6, Model 23, Stepping 10 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) DS (Debug store) ACPI (ACPI supported) MMX (MMX technology supported) FXSR (Fast floating-point save and restore) SSE (Streaming SIMD extensions) SSE2 (Streaming SIMD extensions 2) SS (Self-snoop) HTT (Hyper-threading technology) TM (Thermal monitor supported) PBE (Pending break enabled) Version: Intel(R) Core(TM)2 Quad CPU Q9400 @ 2.66GHz Voltage: 1.2 V External Clock: 1333 MHz Max Speed: 2666 MHz Current Speed: 2666 MHz Status: Populated, Enabled Upgrade: Other L1 Cache Handle: 0x0005 L2 Cache Handle: 0x0006 L3 Cache Handle: Not Provided Serial Number: Asset Tag: Part Number: Core Count: 4 Core Enabled: 4 Thread Count: 4 Characteristics: 64-bit capable
Memory details are type 17:
[root@dirac ~]# dmidecode --type 17 # dmidecode 2.10 SMBIOS 2.5 present. Handle 0x0010, DMI type 17, 27 bytes Memory Device Array Handle: 0x000E Error Information Handle: Not Provided Total Width: 64 bits Data Width: 64 bits Size: 2048 MB Form Factor: DIMM Set: None Locator: DIMM0 Bank Locator: BANK0 Type: DDR2 Type Detail: Synchronous Speed: 800 MHz Manufacturer: CE00000000000000 Serial Number: SerNum0 Asset Tag: AssetTagNum0 Part Number: M3 78T5663QZ3-CF7
And so on an on. The complete list of which DMI type numbers exist and what parts of your system they represent is easily obtainable by checking the man pages for dmidecode (i.e., just type the command man demidecode and scroll down about half-way).
Not something you’ll use every day, I realise (and hence the reason for me committing it to the blog instead of trusting to my memory!), but an excellent and simple utility that saves having to download stuff and worry about installing extras you never intended to have!