使用dmidecode解读服务器硬件信息

dmidecode是一个信息转换工具,能把系统中的硬件信息输出为友好的可读性的信息展现给我们;

一些知名厂商的服务器还可以展现出其服务器型号,序列号等等。
比如我可以在一台dell的服务器上查看到:
[root@~]# dmidecode -t 1
# dmidecode 2.9
SMBIOS 2.5 present.
Handle 0x0100, DMI type 1, 27 bytes
System Information
        Manufacturer: Dell Inc.
        Product Name: PowerEdge 1950
        Version: Not Specified
        Serial Number: CZXSK2X
        UUID: 44454C4C-5A00-1058-8053-C3C04F4B3258
        Wake-up Type: Power Switch
        SKU Number: Not Specified
        Family: Not Specified
其中包括了服务器的型号,序列号等等信息;
dmidecode能查询到包括bios、system、board、mem等多达39种信息;详细可查man帮助信息!

[root@~]# man dmidecode
DMIDECODE(8)                                                      DMIDECODE(8)
NAME
       dmidecode – DMI table decoder
SYNOPSIS
       dmidecode [OPTIONS]
DESCRIPTION
       dmidecode  is  a tool for dumping a computer’s DMI (some say SMBIOS) table contents in a human-readable format.
       This table contains a description of the system’s hardware components, as well as other useful pieces of infor-
       mation  such as serial numbers and BIOS revision. Thanks to this table, you can retrieve this information with-
       out having to probe for the actual hardware.  While this is a good point in terms of report speed and safeness,
       this also makes the presented information possibly unreliable.
       The  DMI table doesn’t only describe what the system is currently made of, it also can report the possible evo-
       lutions (such as the fastest supported CPU or the maximal amount of memory supported).
       SMBIOS stands for System Management BIOS, while DMI stands for Desktop Management Interface. Both standards are
       tightly related and developed by the DMTF (Desktop Management Task Force).
       As  you  run  it, dmidecode will try to locate the DMI table. If it succeeds, it will then parse this table and
       display a list of records like this one:
       Handle 0x0002, DMI type 2, 8 bytes.  Base Board Information
               Manufacturer: Intel
               Product Name: C440GX+
               Version: 727281-001
               Serial Number: INCY92700942
       Each record has:
       · A handle. This is a unique identifier, which allows records to reference each other. For  example,  processor
         records usually reference cache memory records using their handles.
       · A type. The SMBIOS specification defines different types of elements a computer can be made of. In this exam-
         ple, the type is 2, which means that the record contains “Base Board Information”.
       · A size. Each record has a 4-byte header (2 for the handle, 1 for the type, 1 for the size), the rest is  used
         by  the  record  data.  This value doesn’t take text strings into account (these are placed at the end of the
         record), so the actual length of the record may be (and is often) greater than the displayed value.
       · Decoded values. The information presented of course depends on the type of record. Here, we learn  about  the
         board’s manufacturer, model, version and serial number.
OPTIONS
       -d, –dev-mem FILE
              Read memory from device FILE (default: /dev/mem)
       -q, –quiet
              Be less verbose. Unknown, inactive and OEM-specific entries are not displayed. Meta-data and handle ref-
              erences are hidden. Mutually exclusive with –dump.
       -s, –string KEYWORD
              Only display the value of the DMI string identified by KEYWORD.  KEYWORD must be a keyword from the fol-
              lowing  list:  bios-vendor,  bios-version,  bios-release-date, system-manufacturer, system-product-name,
              system-version, system-serial-number, system-uuid, baseboard-manufacturer, baseboard-product-name, base-
              board-version,  baseboard-serial-number,  baseboard-asset-tag, chassis-manufacturer, chassis-type, chas-
              sis-version, chassis-serial-number, chassis-asset-tag, processor-family, processor-manufacturer, proces-
              sor-version,  processor-frequency.   Each  keyword  corresponds  to  a given DMI type and a given offset
              within this entry type.  Not all strings may be meaningful or even defined on all systems. Some keywords
              may  return  more than one result on some systems (e.g.  processor-version on a multi-processor system).
              If KEYWORD is not provided or not valid, a list of all valid keywords is  printed  and  dmidecode  exits
              with an error.  This option cannot be used more than once, and implies –quiet.  Mutually exclusive with
              –type and –dump.
       -t, –type TYPE
              Only display the entries of type TYPE. TYPE can be either a DMI type number, or a  comma-separated  list
              of type numbers, or a keyword from the following list: bios, system, baseboard, chassis, processor, mem-
              ory, cache, connector, slot. Refer to the DMI TYPES section below for details.  If this option  is  used
              more  than  once, the set of displayed entries will be the union of all the given types.  If TYPE is not
              provided or not valid, a list of all valid keywords is printed and dmidecode exits with an error.  Mutu-
              ally exclusive with –string.
       -u, –dump
              Do  not  decode the entries, dump their contents as hexadecimal instead.  Note that this is still a text
              output, no binary data will be thrown upon you. The strings attached to each entry are displayed as both
              hexadecimal  and ASCII. This option is mainly useful for debugging.  Mutually exclusive with –quiet and
              –string.
       -h, –help
              Display usage information and exit
       -V, –version
              Display the version and exit
DMI TYPES
       The SMBIOS specification defines the following DMI types:
       Type   Information
       —————————————-
          0   BIOS
          1   System
          2   Base Board
          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
       Additionally, type 126 is used for disabled entries and type 127 is an end-of-table marker. Types  128  to  255
       are  for  OEM-specific data.  dmidecode will display these entries by default, but it can only decode them when
       the vendors have contributed documentation or code for them.
       Keywords can be used instead of type numbers with –type.  Each keyword is equivalent to a list  of  type  num-
       bers:
       Keyword     Types
       ——————————
       bios        0, 13
       system      1, 12, 15, 23, 32
       baseboard   2, 10
       chassis     3
       processor   4
       memory      5, 6, 16, 17
       cache       7
       connector   8
       slot        9
       Keywords are matched case-insensitively. The following command lines are equivalent:
       · dmidecode –type 0 –type 13
       · dmidecode –type 0,13
       · dmidecode –type bios
       · dmidecode –type BIOS
FILES
       /dev/mem
BUGS
       More often than not, information contained in the DMI tables is inaccurate, incomplete or simply wrong.
AUTHORS
       Alan Cox, Jean Delvare
SEE ALSO
       biosdecode(8), mem(4), ownership(8), vpddecode(8)
dmidecode                        February 2007                    DMIDECODE(8)

 

dmidecode: Finding Out Hardware Details Without Opening The Computer Case

Version 1.0
Author: Falko Timme <ft [at] falkotimme [dot] com>
Last edited 10/24/2008

dmidecode is a tool for dumping a computer’s DMI (some say SMBIOS) table contents in a human-readable format. This table contains a description of the system’s hardware components, as well as other useful pieces of information such as serial numbers and BIOS revision. Thanks to this table, you can retrieve this information without having to probe for the actual hardware.

Take a look at

man dmidecode

to find out all options. The most common option is the –type switch which takes one or more of the following keywords:

bios, system, baseboard, chassis, processor, memory, cache, connector, slot

You can as well specify one or more of the following numbers:

Type Information
—————————————-
0 BIOS
1 System
2 Base Board
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

Each keyword is equivalent to a list of type numbers:

Keyword Types
——————————
bios 0, 13
system 1, 12, 15, 23, 32
baseboard 2, 10
chassis 3
processor 4
memory 5, 6, 16, 17
cache 7
connector 8
slot 9

Here are a few sample outputs from one of my servers:

dmidecode –type bios

server1:/home/admin# dmidecode –type bios
# dmidecode 2.8
SMBIOS 2.5 present.

Handle 0x0000, DMI type 0, 24 bytes
BIOS Information
Vendor: American Megatrends Inc.
Version: V1.5B2
Release Date: 10/31/2007
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
BIOS shadowing is allowed
ESCD support is available
Boot from CD is supported
Selectable boot is supported
BIOS ROM is socketed
EDD is supported
5.25″/1.2 MB floppy services are supported (int 13h)
3.5″/720 KB floppy services are supported (int 13h)
3.5″/2.88 MB floppy services are supported (int 13h)
Print screen service is supported (int 5h)
8042 keyboard services are supported (int 9h)
Serial services are supported (int 14h)
Printer services are supported (int 17h)
CGA/mono video services are supported (int 10h)
ACPI is supported
USB legacy is supported
LS-120 boot is supported
ATAPI Zip drive boot is supported
BIOS boot specification is supported
Targeted content distribution is supported
BIOS Revision: 8.14

Handle 0x0028, DMI type 13, 22 bytes
BIOS Language Information
Installable Languages: 1
en|US|iso8859-1
Currently Installed Language: en|US|iso8859-1

server1:/home/admin#

dmidecode –type system

server1:/home/admin# dmidecode –type system
# dmidecode 2.8
SMBIOS 2.5 present.

Handle 0x0001, DMI type 1, 27 bytes
System Information
Manufacturer: MICRO-STAR INTERANTIONAL CO.,LTD
Product Name: MS-7368
Version: 1.0
Serial Number: To Be Filled By O.E.M.
UUID: Not Present
Wake-up Type: Power Switch
SKU Number: To Be Filled By O.E.M.
Family: To Be Filled By O.E.M.

Handle 0x0027, DMI type 12, 5 bytes
System Configuration Options
Option 1: To Be Filled By O.E.M.

server1:/home/admin#

dmidecode –type baseboard

server1:/home/admin# dmidecode –type baseboard
# dmidecode 2.8
SMBIOS 2.5 present.

Handle 0x0002, DMI type 2, 15 bytes
Base Board Information
Manufacturer: MICRO-STAR INTERANTIONAL CO.,LTD
Product Name: MS-7368
Version: 1.0
Serial Number: To be filled by O.E.M.
Asset Tag: To Be Filled By O.E.M.
Features:
Board is a hosting board
Board is replaceable
Location In Chassis: To Be Filled By O.E.M.
Chassis Handle: 0x0003
Type: Motherboard
Contained Object Handles: 0

Handle 0x0025, DMI type 10, 6 bytes
On Board Device Information
Type: Video
Status: Enabled
Description: To Be Filled By O.E.M.

server1:/home/admin#

dmidecode –type chassis

server1:/home/admin# dmidecode –type chassis
# dmidecode 2.8
SMBIOS 2.5 present.

Handle 0x0003, DMI type 3, 21 bytes
Chassis Information
Manufacturer: To Be Filled By O.E.M.
Type: Desktop
Lock: Not Present
Version: To Be Filled By O.E.M.
Serial Number: To Be Filled By O.E.M.
Asset Tag: To Be Filled By O.E.M.
Boot-up State: Safe
Power Supply State: Safe
Thermal State: Safe
Security Status: None
OEM Information: 0x00000000
Heigth: Unspecified
Number Of Power Cords: 1
Contained Elements: 0

server1:/home/admin#

dmidecode –type processor

server1:/home/admin# dmidecode –type processor
# dmidecode 2.8
SMBIOS 2.5 present.

Handle 0x0004, DMI type 4, 40 bytes
Processor Information
Socket Designation: CPU 1
Type: Central Processor
Family: Other
Manufacturer: AMD
ID: B2 0F 06 00 FF FB 8B 17
Version: AMD Athlon(tm) 64 X2 Dual Core Processor 5600+
Voltage: 1.5 V
External Clock: 200 MHz
Max Speed: 2800 MHz
Current Speed: 2900 MHz
Status: Populated, Enabled
Upgrade: Other
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.

server1:/home/admin#

dmidecode –type memory

server1:/home/admin# dmidecode –type memory
# dmidecode 2.8
SMBIOS 2.5 present.

Handle 0x0008, DMI type 5, 20 bytes
Memory Controller Information
Error Detecting Method: 64-bit ECC
Error Correcting Capabilities:
None
Supported Interleave: One-way Interleave
Current Interleave: One-way Interleave
Maximum Memory Module Size: 512 MB
Maximum Total Memory Size: 1024 MB
Supported Speeds:
70 ns
60 ns
Supported Memory Types:
SIMM
DIMM
SDRAM
Memory Module Voltage: 3.3 V
Associated Memory Slots: 2
0x0009
0x000A
Enabled Error Correcting Capabilities:
None

Handle 0x0009, DMI type 6, 12 bytes
Memory Module Information
Socket Designation: DIMM0
Bank Connections: 0 5
Current Speed: 161 ns
Type: ECC DIMM
Installed Size: 1024 MB (Double-bank Connection)
Enabled Size: 1024 MB (Double-bank Connection)
Error Status: OK

Handle 0x000A, DMI type 6, 12 bytes
Memory Module Information
Socket Designation: DIMM1
Bank Connections: 0 5
Current Speed: 163 ns
Type: ECC DIMM
Installed Size: 1024 MB (Double-bank Connection)
Enabled Size: 1024 MB (Double-bank Connection)
Error Status: OK

Handle 0x0029, DMI type 16, 15 bytes
Physical Memory Array
Location: System Board Or Motherboard
Use: System Memory
Error Correction Type: None
Maximum Capacity: 8 GB
Error Information Handle: Not Provided
Number Of Devices: 2

Handle 0x002B, DMI type 17, 27 bytes
Memory Device
Array Handle: 0x0029
Error Information Handle: Not Provided
Total Width: 64 bits
Data Width: 72 bits
Size: 1024 MB
Form Factor: DIMM
Set: None
Locator: DIMM0
Bank Locator: BANK0
Type: DDR2
Type Detail: Synchronous
Speed: 333 MHz (3.0 ns)
Manufacturer: Manufacturer0
Serial Number: SerNum0
Asset Tag: AssetTagNum0
Part Number: PartNum0

Handle 0x002D, DMI type 17, 27 bytes
Memory Device
Array Handle: 0x0029
Error Information Handle: Not Provided
Total Width: 64 bits
Data Width: 72 bits
Size: 1024 MB
Form Factor: DIMM
Set: None
Locator: DIMM1
Bank Locator: BANK1
Type: DDR2
Type Detail: Synchronous
Speed: 333 MHz (3.0 ns)
Manufacturer: Manufacturer1
Serial Number: SerNum1
Asset Tag: AssetTagNum1
Part Number: PartNum1

server1:/home/admin#

dmidecode –type cache

server1:/home/admin# dmidecode –type cache
# dmidecode 2.8
SMBIOS 2.5 present.

Handle 0x0005, DMI type 7, 19 bytes
Cache Information
Socket Designation: L1-Cache
Configuration: Enabled, Not Socketed, Level 1
Operational Mode: Varies With Memory Address
Location: Internal
Installed Size: 256 KB
Maximum Size: 256 KB
Supported SRAM Types:
Pipeline Burst
Installed SRAM Type: Pipeline Burst
Speed: Unknown
Error Correction Type: Single-bit ECC
System Type: Data
Associativity: 4-way Set-associative

Handle 0x0006, DMI type 7, 19 bytes
Cache Information
Socket Designation: L2-Cache
Configuration: Enabled, Not Socketed, Level 2
Operational Mode: Varies With Memory Address
Location: Internal
Installed Size: 1024 KB
Maximum Size: 1024 KB
Supported SRAM Types:
Pipeline Burst
Installed SRAM Type: Pipeline Burst
Speed: Unknown
Error Correction Type: Single-bit ECC
System Type: Unified
Associativity: 4-way Set-associative

Handle 0x0007, DMI type 7, 19 bytes
Cache Information
Socket Designation: L3-Cache
Configuration: Disabled, Not Socketed, Level 3
Operational Mode: Unknown
Location: Internal
Installed Size: 0 KB
Maximum Size: 0 KB
Supported SRAM Types:
Unknown
Installed SRAM Type: Unknown
Speed: Unknown
Error Correction Type: Unknown
System Type: Unknown
Associativity: Unknown

server1:/home/admin#

dmidecode –type connector

server1:/home/admin# dmidecode –type connector
# dmidecode 2.8
SMBIOS 2.5 present.

Handle 0x000B, DMI type 8, 9 bytes
Port Connector Information
Internal Reference Designator: J1A1
Internal Connector Type: None
External Reference Designator: PS2Mouse
External Connector Type: PS/2
Port Type: Mouse Port

Handle 0x000C, DMI type 8, 9 bytes
Port Connector Information
Internal Reference Designator: J1A1
Internal Connector Type: None
External Reference Designator: Keyboard
External Connector Type: PS/2
Port Type: Keyboard Port

Handle 0x000D, DMI type 8, 9 bytes
Port Connector Information
Internal Reference Designator: J2A2
Internal Connector Type: None
External Reference Designator: USB1
External Connector Type: Access Bus (USB)
Port Type: USB

Handle 0x000E, DMI type 8, 9 bytes
Port Connector Information
Internal Reference Designator: J2A2
Internal Connector Type: None
External Reference Designator: USB2
External Connector Type: Access Bus (USB)
Port Type: USB

Handle 0x000F, DMI type 8, 9 bytes
Port Connector Information
Internal Reference Designator: J4A1
Internal Connector Type: None
External Reference Designator: LPT 1
External Connector Type: DB-25 male
Port Type: Parallel Port ECP/EPP

Handle 0x0010, DMI type 8, 9 bytes
Port Connector Information
Internal Reference Designator: J2A1
Internal Connector Type: None
External Reference Designator: COM A
External Connector Type: DB-9 male
Port Type: Serial Port 16550A Compatible

Handle 0x0011, DMI type 8, 9 bytes
Port Connector Information
Internal Reference Designator: J6A1
Internal Connector Type: None
External Reference Designator: Audio Mic In
External Connector Type: Mini Jack (headphones)
Port Type: Audio Port

Handle 0x0012, DMI type 8, 9 bytes
Port Connector Information
Internal Reference Designator: J6A1
Internal Connector Type: None
External Reference Designator: Audio Line In
External Connector Type: Mini Jack (headphones)
Port Type: Audio Port

Handle 0x0013, DMI type 8, 9 bytes
Port Connector Information
Internal Reference Designator: J6B1 – AUX IN
Internal Connector Type: On Board Sound Input From CD-ROM
External Reference Designator: Not Specified
External Connector Type: None
Port Type: Audio Port

Handle 0x0014, DMI type 8, 9 bytes
Port Connector Information
Internal Reference Designator: J6B2 – CDIN
Internal Connector Type: On Board Sound Input From CD-ROM
External Reference Designator: Not Specified
External Connector Type: None
Port Type: Audio Port

Handle 0x0015, DMI type 8, 9 bytes
Port Connector Information
Internal Reference Designator: J6J2 – PRI IDE
Internal Connector Type: On Board IDE
External Reference Designator: Not Specified
External Connector Type: None
Port Type: Other

Handle 0x0016, DMI type 8, 9 bytes
Port Connector Information
Internal Reference Designator: J6J1 – SEC IDE
Internal Connector Type: On Board IDE
External Reference Designator: Not Specified
External Connector Type: None
Port Type: Other

Handle 0x0017, DMI type 8, 9 bytes
Port Connector Information
Internal Reference Designator: J4J1 – FLOPPY
Internal Connector Type: On Board Floppy
External Reference Designator: Not Specified
External Connector Type: None
Port Type: Other

Handle 0x0018, DMI type 8, 9 bytes
Port Connector Information
Internal Reference Designator: J9H1 – FRONT PNL
Internal Connector Type: 9 Pin Dual Inline (pin 10 cut)
External Reference Designator: Not Specified
External Connector Type: None
Port Type: Other

Handle 0x0019, DMI type 8, 9 bytes
Port Connector Information
Internal Reference Designator: J1B1 – CHASSIS REAR FAN
Internal Connector Type: Other
External Reference Designator: Not Specified
External Connector Type: None
Port Type: Other

Handle 0x001A, DMI type 8, 9 bytes
Port Connector Information
Internal Reference Designator: J2F1 – CPU FAN
Internal Connector Type: Other
External Reference Designator: Not Specified
External Connector Type: None
Port Type: Other

Handle 0x001B, DMI type 8, 9 bytes
Port Connector Information
Internal Reference Designator: J8B4 – FRONT FAN
Internal Connector Type: Other
External Reference Designator: Not Specified
External Connector Type: None
Port Type: Other

Handle 0x001C, DMI type 8, 9 bytes
Port Connector Information
Internal Reference Designator: J9G2 – FNT USB
Internal Connector Type: Other
External Reference Designator: Not Specified
External Connector Type: None
Port Type: Other

Handle 0x001D, DMI type 8, 9 bytes
Port Connector Information
Internal Reference Designator: J6C3 – FP AUD
Internal Connector Type: Other
External Reference Designator: Not Specified
External Connector Type: None
Port Type: Other

Handle 0x001E, DMI type 8, 9 bytes
Port Connector Information
Internal Reference Designator: J9G1 – CONFIG
Internal Connector Type: Other
External Reference Designator: Not Specified
External Connector Type: None
Port Type: Other

Handle 0x001F, DMI type 8, 9 bytes
Port Connector Information
Internal Reference Designator: J8C1 – SCSI LED
Internal Connector Type: Other
External Reference Designator: Not Specified
External Connector Type: None
Port Type: Other

Handle 0x0020, DMI type 8, 9 bytes
Port Connector Information
Internal Reference Designator: J9J2 – INTRUDER
Internal Connector Type: Other
External Reference Designator: Not Specified
External Connector Type: None
Port Type: Other

Handle 0x0021, DMI type 8, 9 bytes
Port Connector Information
Internal Reference Designator: J9G4 – ITP
Internal Connector Type: Other
External Reference Designator: Not Specified
External Connector Type: None
Port Type: Other

Handle 0x0022, DMI type 8, 9 bytes
Port Connector Information
Internal Reference Designator: J2H1 – MAIN POWER
Internal Connector Type: Other
External Reference Designator: Not Specified
External Connector Type: None
Port Type: Other

server1:/home/admin#

dmidecode –type slot

server1:/home/admin# dmidecode –type slot
# dmidecode 2.8
SMBIOS 2.5 present.

Handle 0x0023, DMI type 9, 13 bytes
System Slot Information
Designation: AGP
Type: 32-bit AGP 4x
Current Usage: In Use
Length: Short
ID: 0
Characteristics:
3.3 V is provided
Opening is shared
PME signal is supported

Handle 0x0024, DMI type 9, 13 bytes
System Slot Information
Designation: PCI1
Type: 32-bit PCI
Current Usage: Available
Length: Short
ID: 1
Characteristics:
3.3 V is provided
Opening is shared
PME signal is supported

server1:/home/admin#

发表评论