加载中…
个人资料
  • 博客等级:
  • 博客积分:
  • 博客访问:
  • 关注人气:
  • 获赠金笔:0支
  • 赠出金笔:0支
  • 荣誉徽章:
正文 字体大小:

linux查看内存,CPU,服务器品牌的方法分享

(2015-03-30 17:02:26)
标签:

汽车

分类: linux

命令:
 

复制代码代码示例:
# cat  /proc/cpuinfo //查看cpu个数与频率
# dmidecode  |grep  "Product Name"  //查看服务器品牌和型号

查看主板几个内存插槽、最高支持多大内存、现已使用几个插槽。
命令:
 

复制代码代码示例:

# dmidecode|grep -P 'Maximum\s+Capacity'    //最大支持几G内存

# dmidecode|grep -P -A5 "Memory\s+Device"|grep Size|grep -v Range       //总共几个插槽,已使用几个插槽
Size: 1024 MB       //此插槽有1根1G内存
Size: 1024 MB       //此插槽有1根1G内存
Size: 1024 MB       //此插槽有1根1G内存
Size: 1024 MB       //此插槽有1根1G内存
Size: No Module Installed       //此插槽未使用
Size: No Module Installed       //此插槽未使用

方法2,查看内存总插槽数、已插几条内存、内存多大、内存频率多少?
 

复制代码代码示例:
# dmidecode -t 17        //数字17是dmidecode的参数,本文最后有其他数字参数
dmidecode 2.7
SMBIOS 2.4 present.
Handle 0x0015, DMI type 17, 27 bytes.
Memory Device
  Array Handle: 0x0013
  Error Information Handle: Not Provided
  Total Width: 72 bits
  Data Width: 64 bits
  Size: 2048 MB 【插槽1有1条2GB内存】
  Form Factor: DIMM
  Set: None
  Locator: DIMM00
  Bank Locator: BANK
  Type: Other
  Type Detail: Other
  Speed: 667 MHz (1.5 ns)
  Manufacturer:
  Serial Number: BZACSKZ001
  Asset Tag: RAM82
  Part Number: MT9HTF6472FY-53EA2
Handle 0x0017, DMI type 17, 27 bytes.
Memory Device
  Array Handle: 0x0013
  Error Information Handle: Not Provided
  Total Width: 72 bits
  Data Width: 64 bits
  Size: 2048 MB 【插槽2有1条2GB内存】
  Form Factor: DIMM
  Set: None
  Locator: DIMM10
  Bank Locator: BANK
  Type: Other
  Type Detail: Other
  Speed: 667 MHz (1.5 ns)
  Manufacturer:
  Serial Number: BZACSKZ001
  Asset Tag: RAM83
  Part Number: MT9HTF6472FY-53EA2
Handle 0x0019, DMI type 17, 27 bytes.
Memory Device
  Array Handle: 0x0013
  Error Information Handle: Not Provided
  Total Width: 72 bits
  Data Width: 64 bits
  Size: 2048 MB 【插槽3有1条2GB内存】
  Form Factor: DIMM
  Set: None
  Locator: DIMM20
  Bank Locator: BANK
  Type: Other
  Type Detail: Other
  Speed: 667 MHz (1.5 ns)
  Manufacturer:
  Serial Number: BZACSKZ001
  Asset Tag: RAM84
  Part Number: MT9HTF6472FY-53EA2
Handle 0x001B, DMI type 17, 27 bytes.
Memory Device
  Array Handle: 0x0013
  Error Information Handle: Not Provided
  Total Width: 72 bits
  Data Width: 64 bits
  Size: 2048 MB 【插槽4有1条2GB内存】
  Form Factor: DIMM
  Set: None
  Locator: DIMM30
  Bank Locator: BANK
  Type: Other
  Type Detail: Other
  Speed: 667 MHz (1.5 ns)
  Manufacturer:
  Serial Number: BZACSKZ001
  Asset Tag: RAM85
  Part Number: MT9HTF6472FY-53EA2

根据上面输出可以发现,主板共4个内存插槽,每个插槽多少内存,所用内存频率多大。

附录:
dmidecode支持的数字参数:
 

Type   Information
   ----------------------------------------
         BIOS
         System
         Base Board
         Chassis
         Processor
         Memory Controller
         Memory Module
         Cache
         Port Connector
         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

0

阅读 收藏 喜欢 打印举报/Report
  

新浪BLOG意见反馈留言板 欢迎批评指正

新浪简介 | About Sina | 广告服务 | 联系我们 | 招聘信息 | 网站律师 | SINA English | 产品答疑

新浪公司 版权所有