hive查看表中列的信息命令_Linux查看硬件信息之dmidecode命令详解

 请关注本头条号,每天坚持更新原创干货技术文章。 如需学习视频,请在微信搜索公众号“智传网优”直接开始自助视频学习。

1. dmidecode命令简介

dmidecode 使用 SMBIOS/DMI 标准,在Linux下收集相关硬件信息。

2. 安装dmidecode

以CentOS7.5 为例,最小化安装默认并没有包括这个工具,需要安装

[root@zcwyou ~]# yum -y install dmidecode

输出最后,类似于以下的内容,表明安装成功:

Running Transaction

Installing : 1:dmidecode-3.0-5.el7.x86_64.x86_64 1/1

Verifying : 1:dmidecode-3.0-5.el7.x86_64.x86_64 1/1

Installed:

dmidecode-3.0-5.el7

Complete!

3. 查看服务器型号

[root@zcwyou ~]# dmidecode | grep 'Product Name'

Product Name: PowerEdge R410

Product Name: 01123648

92cb3361b12c2e47327c859ed1edde0f.png

4. 查找主板序列号

[root@controller_slave ~]# dmidecode -s system-serial-number

2412345W1

5f90bf1b643fd4ea27b180b72e0b03a9.png

5. 查看服务器OEM信息:

[root@controller_slave ~]# dmidecode -t 11

#dmidecode 3.0

Getting SMBIOS data from sysfs.

SMBIOS 2.6 present.

Handle 0x0B00, DMI type 11, 5 bytes

OEM Strings

String 1: Dell System

String 2: 5[0000]

a840820ccf66ff3aa13d9d9e39dc9861.png

6. 查看内存信息

真实服务器部分输出信息

6.1查看内存详细信息

[root@controller_slave ~]# dmidecode -t memory

Handle 0x1000, DMI type 16, 15 bytes

Physical Memory Array

Location: System Board Or Motherboard

Use: System Memory

Error Correction Type: Multi-bit ECC

Maximum Capacity: 128 GB

Error Information Handle: Not Provided

Number Of Devices: 8

以上为汇总信息:

Maximum Capacity: 主板最大支持的内存

Number Of Devices: 主板的内存插槽数量

以下为每个内存槽信息

有内存的存槽:

Handle 0x1100, DMI type 17, 28 bytes

Memory Device

​Array Handle: 0x1000

​Error Information Handle: Not Provided

​Total Width: 72 bits

​Data Width: 64 bits

​Size: 8192 MB

​Form Factor: DIMM

​Set: 1

​Locator: DIMM_A1

​Bank Locator: Not Specified

​Type: DDR3

​Type Detail: Synchronous Registered (Buffered)

​Speed: 1333 MHz

​Manufacturer: 00CE00B380CE

​Serial Number: 83BB0BB1

​Asset Tag: 02120463

​Part Number: M393B1K70DH0-YH9

​Rank: 2

没有内存的存槽:

Handle 0x110C, DMI type 17, 28 bytes

Memory Device

​Array Handle: 0x1000

​Error Information Handle: Not Provided

​Total Width: 72 bits

​Data Width: 64 bits

​Size: No Module Installed

​Form Factor: DIMM

​Set: 4

​Locator: DIMM_B4

​Bank Locator: Not Specified

​Type: DDR3

​Type Detail: Synchronous

​Speed: Unknown

​Manufacturer:

​Serial Number:

​Asset Tag:

​Part Number:

​Rank: Unknown

以下输出表示没有内存:

Size: No Module Installed

Speed: Unknown

dd0223d609681a824fd6d433517dfebd.png

6.2 查看内存的汇总信息

可以看到8根内存槽插了4根内存。

[root@controller_slave ~]# dmidecode|grep -P -A5 "Memorys+Device"|grep Size|grep -v Range

Size: 8192 MB

Size: 8192 MB

Size: 8192 MB

Size: 8192 MB

Size: No Module Installed

Size: No Module Installed

Size: No Module Installed

Size: No Module Installed

563e395a5bc6a4cf5b97a7bda7ed06a7.png

6.3 Linux查看主板支持的最大内存

[root@controller_slave ~]# dmidecode|grep 'Maximum Capacity'

Maximum Capacity: 128 GB

4bfafd41e8bf36bd1cf923a3a1e6f495.png

6.4 Linux查看内存信息

[root@controller_slave ~]# dmidecode -t 16

#dmidecode 3.0

Getting SMBIOS data from sysfs.

SMBIOS 2.6 present.

Handle 0x1000, DMI type 16, 15 bytes

Physical Memory Array

Location: System Board Or Motherboard

Use: System Memory

Error Correction Type: Multi-bit ECC

Maximum Capacity: 128 GB

Error Information Handle: Not Provided

Number Of Devices: 8

a09abaa42877975bd5c741c707daf84d.png

6.5 Linux系统查看内存规格信息

[root@controller_slave ~]# dmidecode|grep -A16 'Memory Device'|grep 'Speed'

Speed: 1333 MHz

Speed: 1333 MHz

Speed: 1333 MHz

Speed: 1333 MHz

Speed: Unknown

Speed: Unknown

Speed: Unknown

Speed: Unknown

9c13c4ed35f47246a61d9334fe46db9d.png

7. Linux系统查看CPU详细信息

以下输出表明该服务器有2个物理CPU,服务器一般都是2个物理CPU以上。

[root@controller_slave ~]# dmidecode -t processor

#dmidecode 3.0

Getting SMBIOS data from sysfs.

SMBIOS 2.6 present.

Handle 0x0004, DMI type 4, 40 bytes

Processor Information

Socket Designation: CPU 1

Type: Central Processor

Family: Core 2 Quad

Manufacturer: Intel

ID: 77 06 01 00 FF FB EB BF

Signature: Type 0, Family 6, Model 23, Stepping 7

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 (FXSAVE and FXSTOR instructions supported)

SSE (Streaming SIMD extensions)

SSE2 (Streaming SIMD extensions 2)

SS (Self-snoop)

HTT (Multi-threading)

TM (Thermal monitor supported)

PBE (Pending break enabled)

Version: Intel(R) Core(TM)2 Quad CPU Q9300 @ 2.50GHz

Voltage: 1.2 V

External Clock: 333 MHz

Max Speed: 2500 MHz

Current Speed: 2500 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.

Core Count: 4

Core Enabled: 4

Thread Count: 4

Characteristics:

64-bit capable

Handle 0x0401, DMI type 4, 40 bytes

Processor Information

Socket Designation: CPU2

Type: Central Processor

Family: Unknown

Manufacturer: Intel

ID: 00 00 00 00 00 00 00 00

Version: Not Specified

Voltage: 1.2 V

External Clock: Unknown

Max Speed: 2500 MHz

Current Speed: Unknown

Status: Unpopulated

Upgrade: Socket 423

L1 Cache Handle: 0x0003

L2 Cache Handle: 0x0004

L3 Cache Handle: 0x0005

Serial Number: Not Specified

Asset Tag: Not Specified

Part Number: Not Specified

Characteristics:

64-bit capable

2d1447a0ccf681bed873b47e5f6fe763.png

总结:dmidecode是一个强大的硬件查询工具,可以通过它查询硬件的详细信息。

点击了解更多,快速查看更多的技术文章列表。

https://www.linuxrumen.com/cyml/380.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值