linux 查看内存信息,及其他硬件信息 dmidecode命令

由于想换内存,想看看内存型号、频率,简单搜了下命令 可以用dmidecode 命令查看。

dmidecode -t memory

这个命令可以查看内存的几乎所有信息,包括频率 大小等等

另外这个命令强大到几乎可以查任何硬件信息 包括bios cpu 等,应该是只有在dmi总线上的都可以查

dmidecode -t
dmidecode: option requires an argument -- 't'
Type number or keyword expected
Valid type keywords are:
  bios
  system
  baseboard
  chassis
  processor
  memory
  cache
  connector
  slot

另外dmidecode这个命令很强大,几乎可以查所有的硬件信息

dmidecode --help
Usage: dmidecode [OPTIONS]
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
     --no-sysfs         Do not attempt to read DMI data from sysfs files
     --oem-string N     Only display the value of the given OEM string
 -V, --version          Display the version and exit

更相信的信息可以参考:http://man.linuxde.net/dmidecode

dmidecode参数string及type列表: (1)Valid string keywords are: bios-vendor bios-version bios-release-date system-manufacturer system-product-name system-version system-serial-number system-uuid baseboard-manufacturer baseboard-product-name baseboard-version baseboard-serial-number baseboard-asset-tag chassis-manufacturer chassis-type chassis-version chassis-serial-number chassis-asset-tag processor-family processor-manufacturer processor-version processor-frequency (2)Valid type keywords are: bios system baseboard chassis processor memory Cache connector slot (3)type全部编码列表: BIOS System Base Board Chassis Processor Memory Controller Memory Module Cache Port Connector System Slots On Board Devices OEM Strings System Configuration Options BIOS Language Group Associations System Event Log Physical Memory Array Memory Device 32-bit Memory Error Memory Array Mapped Address Memory Device Mapped Address Built-in Pointing Device Portable Battery System Reset Hardware Security System Power Controls Voltage Probe Cooling Device Temperature Probe Electrical Current Probe Out-of-band Remote Access Boot Integrity Services System Boot 64-bit Memory Error Management Device Management Device Component Management Device Threshold Data Memory Channel IPMI Device Power Supply Additional Information Onboard Device

来自: http://man.linuxde.net/dmidecode
dmidecode参数string及type列表:
(1)Valid string keywords are:
  • bios-vendor
  • bios-version
  • bios-release-date
  • system-manufacturer
  • system-product-name
  • system-version
  • system-serial-number
  • system-uuid
  • baseboard-manufacturer
  • baseboard-product-name
  • baseboard-version
  • baseboard-serial-number
  • baseboard-asset-tag
  • chassis-manufacturer
  • chassis-type
  • chassis-version
  • chassis-serial-number
  • chassis-asset-tag
  • processor-family
  • processor-manufacturer
  • processor-version
  • processor-frequency
(2)Valid type keywords are:
  • bios
  • system
  • baseboard
  • chassis
  • processor
  • memory
  • Cache
  • connector
  • slot
(3)type全部编码列表:
  • BIOS
  • System
  • Base Board
  • Chassis
  • Processor
  • Memory Controller
  • Memory Module
  • Cache
  • Port Connector
  • System Slots
  • On Board Devices
  • OEM Strings
  • System Configuration Options
  • BIOS Language
  • Group Associations
  • System Event Log
  • Physical Memory Array
  • Memory Device
  • 32-bit Memory Error
  • Memory Array Mapped Address
  • Memory Device Mapped Address
  • Built-in Pointing Device
  • Portable Battery
  • System Reset
  • Hardware Security
  • System Power Controls
  • Voltage Probe
  • Cooling Device
  • Temperature Probe
  • Electrical Current Probe
  • Out-of-band Remote Access
  • Boot Integrity Services
  • System Boot
  • 64-bit Memory Error
  • Management Device
  • Management Device Component
  • Management Device Threshold Data
  • Memory Channel
  • IPMI Device
  • Power Supply
  • Additional Information
  • Onboard Device
实例
查看服务器型号:dmidecode | grep 'Product Name'
查看主板的序列号:dmidecode |grep 'Serial Number'
查看系统序列号:dmidecode -s system-serial-number
查看内存信息:dmidecode -t memory
查看OEM信息:dmidecode -t 11
不带选项执行dmidecode命令通常会输出所有的硬件信息。dmidecode命令有个很有用的选项-t,可以按指定类型输出相关信息,假如要获得处理器方面的信息,则可以执行:

[root@localhost ~]# dmidecode -t processor

dmidecode参数string及type列表: (1)Valid string keywords are: bios-vendor bios-version bios-release-date system-manufacturer system-product-name system-version system-serial-number system-uuid baseboard-manufacturer baseboard-product-name baseboard-version baseboard-serial-number baseboard-asset-tag chassis-manufacturer chassis-type chassis-version chassis-serial-number chassis-asset-tag processor-family processor-manufacturer processor-version processor-frequency (2)Valid type keywords are: bios system baseboard chassis processor memory Cache connector slot (3)type全部编码列表: BIOS System Base Board Chassis Processor Memory Controller Memory Module Cache Port Connector System Slots On Board Devices OEM Strings System Configuration Options BIOS Language Group Associations System Event Log Physical Memory Array Memory Device 32-bit Memory Error Memory Array Mapped Address Memory Device Mapped Address Built-in Pointing Device Portable Battery System Reset Hardware Security System Power Controls Voltage Probe Cooling Device Temperature Probe Electrical Current Probe Out-of-band Remote Access Boot Integrity Services System Boot 64-bit Memory Error Management Device Management Device Component Management Device Threshold Data Memory Channel IPMI Device Power Supply Additional Information Onboard Device

来自: http://man.linuxde.net/dmidecode
dmidecode参数string及type列表: (1)Valid string keywords are: bios-vendor bios-version bios-release-date system-manufacturer system-product-name system-version system-serial-number system-uuid baseboard-manufacturer baseboard-product-name baseboard-version baseboard-serial-number baseboard-asset-tag chassis-manufacturer chassis-type chassis-version chassis-serial-number chassis-asset-tag processor-family processor-manufacturer processor-version processor-frequency (2)Valid type keywords are: bios system baseboard chassis processor memory Cache connector slot (3)type全部编码列表: BIOS System Base Board Chassis Processor Memory Controller Memory Module Cache Port Connector System Slots On Board Devices OEM Strings System Configuration Options BIOS Language Group Associations System Event Log Physical Memory Array Memory Device 32-bit Memory Error Memory Array Mapped Address Memory Device Mapped Address Built-in Pointing Device Portable Battery System Reset Hardware Security System Power Controls Voltage Probe Cooling Device Temperature Probe Electrical Current Probe Out-of-band Remote Access Boot Integrity Services System Boot 64-bit Memory Error Management Device Management Device Component Management Device Threshold Data Memory Channel IPMI Device Power Supply Additional Information Onboard Device

来自: http://man.linuxde.net/dmidecode
原文地址:https://www.cnblogs.com/zhishuai/p/7857318.html