博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Linux下查看CPU型号,内存大小,硬盘空间命令
阅读量:5150 次
发布时间:2019-06-13

本文共 2979 字,大约阅读时间需要 9 分钟。

1 查看CPU

  1.1 查看CPU个数

  # cat /proc/cpuinfo | grep "physical id" | uniq | wc -l

  2

  **uniq命令:删除重复行;wc –l命令:统计行数**

  1.2 查看CPU核数

  # cat /proc/cpuinfo | grep "cpu cores" | uniq

  cpu cores : 4

  1.3 查看CPU型号

  # cat /proc/cpuinfo | grep 'model name' |uniq

  model name : Intel(R) Xeon(R) CPU E5630 @ 2.53GHz

  总结:该服务器有2个4核CPU,型号Intel(R) Xeon(R) CPU E5630 @ 2.53GHz

2 查看内存

  2.1 查看内存总数

  #cat /proc/meminfo | grep MemTotal

  MemTotal: 32941268 kB //内存32G

  2.2 查看内存条数

  本节内容引自新浪博文《Linux查看内存条数》

  查看原文:

  # dmidecode |grep -A16 "Memory Device$"

  Memory Device

  Array Handle: 0x1000

  Error Information Handle: Not Provided

  Total Width: 72 bits

  Data Width: 64 bits

  Size: 2048 MB //1条2G内存

  Form Factor: DIMM

  Set: 1

  Locator: DIMM1

  Bank Locator: Not Specified

  Type: DDR2

  Type Detail: Synchronous

  Speed: 667 MHz

  Manufacturer: 7F7F7F7F7F510000

  Serial Number: 0403E324

  Asset Tag: 450721

  Part Number: 72T256220HR3SA

  --

  Memory Device

  Array Handle: 0x1000

  Error Information Handle: Not Provided

  Total Width: 72 bits

  Data Width: 64 bits

  Size: 2048 MB //1条2G内存

  Form Factor: DIMM

  Set: 1

  Locator: DIMM2

  Bank Locator: Not Specified

  Type: DDR2

  Type Detail: Synchronous

  Speed: 667 MHz

  Manufacturer: 7F7F7F7F7F510000

  Serial Number: 0403E324

  Asset Tag: 450721

  Part Number: 72T256220HR3SA

  --

  Memory Device

  Array Handle: 0x1000

  Error Information Handle: Not Provided

  Total Width: 72 bits

  Data Width: 64 bits

  Size: No Module Installed //1个内存空槽

  Form Factor: DIMM

  Set: 2

  Locator: DIMM3

  Bank Locator: Not Specified

  Type: DDR2

  Type Detail: Synchronous

  Speed: Unknown

  Manufacturer:

  Serial Number:

  Asset Tag:

  Part Number:

  --

  Memory Device

  Array Handle: 0x1000

  Error Information Handle: Not Provided

  Total Width: 72 bits

  Data Width: 64 bits

  Size: No Module Installed //1个内存空槽

  Form Factor: DIMM

  Set: 2

  Locator: DIMM4

  Bank Locator: Not Specified

  Type: DDR2

  Type Detail: Synchronous

  Speed: Unknown

  Manufacturer:

  Serial Number:

  Asset Tag:

  Part Number:

  --

  Memory Device

  Array Handle: 0x1000

  Error Information Handle: Not Provided

  Total Width: 72 bits

  Data Width: 64 bits

  Size: No Module Installed //1个内存空槽

  Form Factor: DIMM

  Set: 3

  Locator: DIMM5

  Bank Locator: Not Specified

  Type: DDR2

  Type Detail: Synchronous

  Speed: Unknown

  Manufacturer:

  Serial Number:

  Asset Tag:

  Part Number:

  --

  Memory Device

  Array Handle: 0x1000

  Error Information Handle: Not Provided

  Total Width: 72 bits

  Data Width: 64 bits

  Size: No Module Installed //1个内存空槽

  Form Factor: DIMM

  Set: 3

  Locator: DIMM6

  Bank Locator: Not Specified

  Type: DDR2

  Type Detail: Synchronous

  Speed: Unknown

  Manufacturer:

  Serial Number:

  Asset Tag:

  Part Number:

  总结:该服务器有两条2G内存 ,空余4个插槽

3 查看硬盘

  3.1 查看硬盘大小

  # fdisk -l | grep Disk

  Disk /dev/cciss/c0d0: 146.7 GB, 146778685440 bytes

  总结:硬盘大小146.7G,即厂商标称的160G

转载于:https://www.cnblogs.com/zyw-205520/p/4648193.html

你可能感兴趣的文章
bzoj1040: [ZJOI2008]骑士
查看>>
LeetCode 74. Search a 2D Matrix(搜索二维矩阵)
查看>>
利用SignalR来同步更新Winfrom
查看>>
反射机制
查看>>
CocoaPod
查看>>
BZOJ 1251: 序列终结者 [splay]
查看>>
5G边缘网络虚拟化的利器:vCPE和SD-WAN
查看>>
MATLAB基础入门笔记
查看>>
【UVA】434-Matty's Blocks
查看>>
Android开发技术周报 Issue#80
查看>>
hadoop2.2.0+hive-0.10.0完全分布式安装方法
查看>>
django知识点总结
查看>>
C++ STL stack、queue和vector的使用
查看>>
OAuth2 .net MVC实现获取token
查看>>
java中XML操作:xml与string互转、读取XML文档节点及对XML节点增删改查
查看>>
使用Reporting Services时遇到的小问题
查看>>
约瑟夫问题
查看>>
Arduino 报错总结
查看>>
树莓派Android Things物联网开发:树莓派GPIO引脚图
查看>>
矩阵快速幂---BestCoder Round#8 1002
查看>>