Tuesday, January 15, 2013

The linux command: dmidecode

The linux command dmidecode is a tool for dumping a computer's DMI.

# dmidecode -h
Usage: dmidecode [OPTIONS]
Options are:
 -d, --dev-mem FILE     Read memory from device FILE (default: /dev/mem)
 -h, --help             Display this help text and exit
 -q, --quiet            Less verbose output
 -s, --string KEYWORD   Only display the value of the given DMI string
 -t, --type TYPE        Only display the entries of given type
 -u, --dump             Do not decode the entries
 -V, --version          Display the version and exit

Let's see the option: -t.

# dmidecode -t -h
Invalid type keyword: -h
Valid type keywords are:

Now let's show you some infos about my old processor.

# dmidecode -t processor
# dmidecode 2.9
SMBIOS 2.3 present.

Handle 0x0004, DMI type 4, 32 bytes
Processor Information
 Socket Designation: SOCKET A
 Type: Central Processor
 Family: Other
 Manufacturer: AuthenticAMD
 ID: 62 06 00 00 FF FB 83 03
 Signature: Family 6, Model 6, Stepping 2
  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)
  MMX (MMX technology supported)
  FXSR (Fast floating-point save and restore)
  SSE (Streaming SIMD extensions)
 Version: AMD Athlon(TM) MP 1700+
 Voltage: 1.7 V
 External Clock: 133 MHz
 Max Speed: 2250 MHz
 Current Speed: 1466 MHz
 Status: Populated, Enabled
 Upgrade: Other
 L1 Cache Handle: 0x0009
 L2 Cache Handle: 0x000A
 L3 Cache Handle: Not Provided

Also you can use this format to read infos.

# dmidecode --type 0 --type 13 

The numbers tell what to read, see:

system  1, 12, 15, 23, 32
baseboard  2, 10, 41
chassis  3
processor  4
memory  5, 6, 16, 17
cache  7
connector  8
slot  9