查看linux服务器硬件信息的方法
命令:
dmidecode
参数:--type 可以简化为-t
1 root@localhost ~]$ dmidecode # 打印所有硬件信息 2 [root@localhost ~]$ dmidecode -q # 打印所有硬件信息,比较简洁[root@localhost ~]$ dmidecode -h # 获取帮助 3 [root@localhost ~]$ dmidecode | grep 'Product Name' # 以过滤的方式来查看指定的硬件信息 4 [root@localhost ~]$ dmidecode --type bios # 查看BIOS相关的硬件信息 5 [root@localhost ~]$ dmidecode --type system # 查看系统相关的硬件信息 6 [root@localhost ~]$ dmidecode --type baseboard # 查看主板相关的硬件信息 7 [root@localhost ~]$ dmidecode --type chassis # 查看机箱相关的硬件信息 8 [root@localhost ~]$ dmidecode --type processor # 查看处理器相关的硬件信息 9 [root@localhost ~]$ dmidecode --type memory # 查看内存相关的硬件信息
1
2
3
4
5
|
[root@localhost ~]$ dmidecode -t 1 #查看system基本信息,-t等价于--type [root@localhost ~]$ dmidecode -t 15 #查看system Event信息 [root@localhost ~]$ dmidecode -t 23 #查看system Reset信息 [root@localhost ~]$ dmidecode -t 32 #查看system Boot信息 [root@localhost ~]$ dmidecode -t 1,15,23,32 #查看system所有信息,等价于dmidecode -t system |
1 Type Information 2 -------------------------------------------- 3 0 BIOS 4 1 System 5 2 Baseboard 6 3 Chassis 7 4 Processor 8 5 Memory Controller 9 6 Memory Module 10 7 Cache 11 8 Port Connector 12 9 System Slots 13 10 On Board Devices 14 11 OEM Strings 15 12 System Configuration Options 16 13 BIOS Language 17 14 Group Associations 18 15 System Event Log 19 16 Physical Memory Array 20 17 Memory Device 21 18 32-bit Memory Error 22 19 Memory Array Mapped Address 23 20 Memory Device Mapped Address 24 21 Built-in Pointing Device 25 22 Portable Battery 26 23 System Reset 27 24 Hardware Security 28 25 System Power Controls 29 26 Voltage Probe 30 27 Cooling Device 31 28 Temperature Probe 32 29 Electrical Current Probe 33 30 Out-of-band Remote Access 34 31 Boot Integrity Services 35 32 System Boot 36 33 64-bit Memory Error 37 34 Management Device 38 35 Management Device Component 39 36 Management Device Threshold Data 40 37 Memory Channel 41 38 IPMI Device 42 39 Power Supply 43 40 Additional Information 44 41 Onboard Devices Extended Information 45 42 Management Controller Host Interface 46 #如果需要获取CPU的信息可以 47 dmidecode -t 4 即可 48 grep -A9 输入结果的后9行 A为after B为before C为center
阅读剩余
THE END