1 查看CPU

1.1 查看CPU个数

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

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

1.2 查看CPU核数

  1. cat /proc/cpuinfo | grep "cpu cores" | uniq

1.3 查看CPU型号

  1. 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 查看内存总数

  1. cat /proc/meminfo | grep MemTotal

MemTotal: 32941268 kB //内存32G

2.2 查看内存条数

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

  1. dmidecode |grep -A16 "Memory Device$"
  1. # dmidecode |grep -A16 "Memory Device$"
  2. Memory Device
  3. Array Handle: 0x1000
  4. Error Information Handle: Not Provided
  5. Total Width: 72 bits
  6. Data Width: 64 bits
  7. Size: 2048 MB //1条2G内存
  8. Form Factor: DIMM
  9. Set: 1
  10. Locator: DIMM1
  11. Bank Locator: Not Specified
  12. Type: DDR2
  13. Type Detail: Synchronous
  14. Speed: 667 MHz
  15. Manufacturer: 7F7F7F7F7F510000
  16. Serial Number: 0403E324
  17. Asset Tag: 450721
  18. Part Number: 72T256220HR3SA
  19. --
  20. Memory Device
  21. Array Handle: 0x1000
  22. Error Information Handle: Not Provided
  23. Total Width: 72 bits
  24. Data Width: 64 bits
  25. Size: 2048 MB //1条2G内存
  26. Form Factor: DIMM
  27. Set: 1
  28. Locator: DIMM2
  29. Bank Locator: Not Specified
  30. Type: DDR2
  31. Type Detail: Synchronous
  32. Speed: 667 MHz
  33. Manufacturer: 7F7F7F7F7F510000
  34. Serial Number: 0403E324
  35. Asset Tag: 450721
  36. Part Number: 72T256220HR3SA
  37. --
  38. Memory Device
  39. Array Handle: 0x1000
  40. Error Information Handle: Not Provided
  41. Total Width: 72 bits
  42. Data Width: 64 bits
  43. Size: No Module Installed //1个内存空槽
  44. Form Factor: DIMM
  45. Set: 2
  46. Locator: DIMM3
  47. Bank Locator: Not Specified
  48. Type: DDR2
  49. Type Detail: Synchronous
  50. Speed: Unknown
  51. Manufacturer:
  52. Serial Number:
  53. Asset Tag:
  54. Part Number:
  55. --
  56. Memory Device
  57. Array Handle: 0x1000
  58. Error Information Handle: Not Provided
  59. Total Width: 72 bits
  60. Data Width: 64 bits
  61. Size: No Module Installed //1个内存空槽
  62. Form Factor: DIMM
  63. Set: 2
  64. Locator: DIMM4
  65. Bank Locator: Not Specified
  66. Type: DDR2
  67. Type Detail: Synchronous
  68. Speed: Unknown
  69. Manufacturer:
  70. Serial Number:
  71. Asset Tag:
  72. Part Number:
  73. --
  74. Memory Device
  75. Array Handle: 0x1000
  76. Error Information Handle: Not Provided
  77. Total Width: 72 bits
  78. Data Width: 64 bits
  79. Size: No Module Installed //1个内存空槽
  80. Form Factor: DIMM
  81. Set: 3
  82. Locator: DIMM5
  83. Bank Locator: Not Specified
  84. Type: DDR2
  85. Type Detail: Synchronous
  86. Speed: Unknown
  87. Manufacturer:
  88. Serial Number:
  89. Asset Tag:
  90. Part Number:
  91. --
  92. Memory Device
  93. Array Handle: 0x1000
  94. Error Information Handle: Not Provided
  95. Total Width: 72 bits
  96. Data Width: 64 bits
  97. Size: No Module Installed //1个内存空槽
  98. Form Factor: DIMM
  99. Set: 3
  100. Locator: DIMM6
  101. Bank Locator: Not Specified
  102. Type: DDR2
  103. Type Detail: Synchronous
  104. Speed: Unknown
  105. Manufacturer:
  106. Serial Number:
  107. Asset Tag:
  108. Part Number:


总结:该服务器有两条2G内存 ,空余4个插槽
3 查看硬盘
3.1 查看硬盘大小
# fdisk -l | grep Disk
Disk /dev/cciss/c0d0: 146.7 GB, 146778685440 bytes
总结:硬盘大小146.7G,即厂商标称的160G