Wednesday, 19 December 2012

Learn about dmidecode

dmidecode
======

This can be said as a tool which is used to decode the DMI (some say SMBIOS) table contents.
After reading this article you will understand, how useful this tool is for a system administrator.

Some of the 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
    --dump-bin FILE    Dump the DMI data to a binary file
    --from-dump FILE   Read the DMI data from a binary file
-V, --version          Display the version and exit


In these options -t (type) is what we have to learn in detail.

Output of dmidecode -t:
=====

 Type   Information
----------------------------------------
         0   BIOS
         1   System
         2   , type the following command 
         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
        40   Additional Information
        41   Onboard Device

If you want to get full details of processor then type command "dmidecode -t 4"
 
Sample o/p:
=====
dmidecode -t 4
dmidecode 2.11
SMBIOS 2.3 present.
Handle 0x0004, DMI type 4, 35 bytes
Processor Information
Socket Designation: mPGA478
Type: Central Processor
Family: Pentium 4
Manufacturer: Intel            
ID: 29 0F 00 00 FF FB EB BF
Signature: Type 0, Family 15, Model 2, Stepping 9
Version: Intel(R) Xeon(TM) CPU 2.40GHz                       
Voltage: 3.3 V 2.9 V
External Clock: 133 MHz
Max Speed: 2400 MHz
Current Speed: 2400 MHz
Status: Populated, Enabled
Upgrade: Socket 423
L1 Cache Handle: 0x0005
L2 Cache Handle: 0x0006
L3 Cache Handle: 0x0007
Serial Number: To Be Filled By O.E.M.
Asset Tag: To Be Filled By O.E.M.
Part Number: To Be Filled By O.E.M. 

To get the information about baseboard:
====
dmidecode -t 2
SMBIOS 2.3 present.
Handle 0x0002, DMI type 2, 8 bytes
Base Board Information
Manufacturer: Supermicro
Product Name: X5DPA-TGM+
Version: A1
Serial Number: 00000000
=====
 
dmidecode, used to find out the memory information:
=====
dmidecode -t 16
# dmidecode 2.11
SMBIOS 2.3 present.
Handle 0x001F, DMI type 16, 15 bytes
Physical Memory Array
Location: System Board Or Motherboard
Use: System Memory
Error Correction Type: None
Maximum Capacity: 4 GB
Error Information Handle: 0x001E
Number Of Devices: 4
=====
 
The above example shows that, the system have 4 slots and has a maximum capacity of
4 GB.

Now, to understand the details of RAM in the system use the command command 
dmidecode -t 17

====
Memory Device
Array Handle: 0x001F
Error Information Handle: 0x001E
Total Width: 64 bits
Data Width: 64 bits
Size: 128 MB
Form Factor: DIMM
Set: None
Locator: DIMM4
Bank Locator: BANK1
Type: SDRAM
Type Detail: Synchronous
Speed: Unknown
Manufacturer: Manufacturer2
Serial Number: SerNum2
Asset Tag: AssetTagNum2
Part Number: PartNum2
====
 
The above example show that, the system has SDRAM and it's size is 128 MB. 
Really low right !!!!
 
Now comes the ERROR:
==== 
Errors
=====
If you get the following error while using dmidecode

dmidecode
  1. dmidecode 2.9
/dev/mem: No such file or director

Solution:
======

mknod -m 660 /dev/mem c 1 1

Also check the permission of the file “/dev/mem”. It should be like the following

chown root:kmem /dev/mem
 
 
 Cool !!! Problem Solved !!

No comments:

Post a Comment

Note: only a member of this blog may post a comment.