linxu 系统 安装 使用Dmidecode命令,查看服务器硬件信息

公司linux系统服务器业务一般都在外地,如果某时想知道,服务器的CPU、主板,内存型号或者bios信息怎么办?除了到机房或者重启服务器按delete进入bios查看,还

 
有没有更好的办法?答案是肯定的,有!不需要到机房、不需要重启进入bios。使用dmidecode 命令即可查看服务器一些硬件信息和bios信息。配置使用方法如下:
 
Dmidecode简介
DMI (Desktop Management Interface, DMI)就是帮助收集电脑系统信息的管理系统,DMI信息的收集必须在严格遵照SMBIOS规范的前提下进行。 SMBIOS(System Management BIOS)
 
是主板或系统制造者以标准格式显示产品管理信息所需遵循的统一规范。SMBIOS和DMI是由行业指导机构Desktop Management Task Force (DMTF)起草的开放性的技术标准,其中
 
DMI设计适用于任何的平台和操作系统。
 
1.软件安装
 
#查看软件包是否安装
 
rpm  -qa|grep dmidecode
dmidecode-2.11-2.el6.x86_64
 
 
#如果没有安装,使用下面命令安装;
yum install -y dmidecode
 
#参数
-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
只显示指定DMI字符串的信息
-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
显示版本信息
 
#有效输入关键词:
bios
system
baseboard
chassis
processor
memory
Cache
connector
slot
 
#全部编码列表
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
40 Additional Information
41 Onboard Device
 
 
#使用方法
 
#事例1
dmidecode -t bios
 
# dmidecode 2.11
SMBIOS 2.5 present.
 
Handle 0x0005, DMI type 0, 24 bytes
BIOS Information
        Vendor: Intel Corp.
        Version: S3420TH.86B.01.01.0011.121620091734
        Release Date: 12/16/2009
        Address: 0xF0000
        Runtime Size: 64 kB
        ROM Size: 8192 kB
        Characteristics:
                PCI is supported
                PNP is supported
                BIOS is upgradeable
                BIOS shadowing is allowed
                Boot from CD is supported
                Selectable boot is supported
                EDD is supported
                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)
                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
                Function key-initiated network boot is supported
                Targeted content distribution is supported
        BIOS Revision: 17.19
        Firmware Revision: 0.0
 
Handle 0x001E, DMI type 13, 22 bytes
BIOS Language Information
        Language Description Format: Long
        Installable Languages: 1
                en|US|iso8859-1
        Currently Installed Language: en|US|iso8859-1
 
#事例2
dmidecode -t system
 
# dmidecode 2.11
SMBIOS 2.5 present.
 
Handle 0x0002, DMI type 1, 27 bytes
System Information
        Manufacturer: Not Specified
        Product Name: Lenovo WQ R512 G2
        Version: ....................
        Serial Number: NC123456789
        UUID: Not Present
        Wake-up Type: AC Power Restored
        SKU Number: Not Specified
        Family: Not Specified
 
Handle 0x001A, DMI type 12, 5 bytes
System Configuration Options
        Option 1: J1G2/J9J1 2-3: Close to clear CMOS
 
Handle 0x001B, DMI type 12, 5 bytes
System Configuration Options
        Option 1: J2G3/J9H3 2-3: Close for BIOS Recovery
 
Handle 0x001C, DMI type 12, 5 bytes
System Configuration Options
        Option 1: J1A1/J5A1 2-3: Close to Force BMC Update Mode
 
Handle 0x0020, DMI type 32, 20 bytes
System Boot Information
        Status: No errors detected
 

本文出自 “康建华” 博客,请务必保留此出处http://michaelkang.blog.51cto.com/1553154/1160395

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值