首页 > 服务器 > Linux服务器 > 正文

Linux下查看CPU型号,内存大小,硬盘空间的命令(详解)

2024-09-05 23:02:53
字体:
来源:转载
供稿:网友

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 DeviceArray Handle: 0x1000Error Information Handle: Not ProvidedTotal Width: 72 bitsData Width: 64 bitsSize: 2048 MB //1条2G内存Form Factor: DIMMSet: 1Locator: DIMM1Bank Locator: Not SpecifiedType: DDR2Type Detail: SynchronousSpeed: 667 MHzManufacturer: 7F7F7F7F7F510000Serial Number: 0403E324Asset Tag: 450721Part Number: 72T256220HR3SA--Memory DeviceArray Handle: 0x1000Error Information Handle: Not ProvidedTotal Width: 72 bitsData Width: 64 bitsSize: 2048 MB //1条2G内存Form Factor: DIMMSet: 1Locator: DIMM2Bank Locator: Not SpecifiedType: DDR2Type Detail: SynchronousSpeed: 667 MHzManufacturer: 7F7F7F7F7F510000Serial Number: 0403E324Asset Tag: 450721Part Number: 72T256220HR3SA--Memory DeviceArray Handle: 0x1000Error Information Handle: Not ProvidedTotal Width: 72 bitsData Width: 64 bitsSize: No Module Installed //1个内存空槽Form Factor: DIMMSet: 2Locator: DIMM3Bank Locator: Not SpecifiedType: DDR2Type Detail: SynchronousSpeed: UnknownManufacturer:Serial Number:Asset Tag:Part Number:--Memory DeviceArray Handle: 0x1000Error Information Handle: Not ProvidedTotal Width: 72 bitsData Width: 64 bitsSize: No Module Installed //1个内存空槽Form Factor: DIMMSet: 2Locator: DIMM4Bank Locator: Not SpecifiedType: DDR2Type Detail: SynchronousSpeed: UnknownManufacturer:Serial Number:Asset Tag:Part Number:--Memory DeviceArray Handle: 0x1000Error Information Handle: Not ProvidedTotal Width: 72 bitsData Width: 64 bitsSize: No Module Installed //1个内存空槽Form Factor: DIMMSet: 3Locator: DIMM5Bank Locator: Not SpecifiedType: DDR2Type Detail: SynchronousSpeed: UnknownManufacturer:Serial Number:Asset Tag:Part Number:--Memory DeviceArray Handle: 0x1000Error Information Handle: Not ProvidedTotal Width: 72 bitsData Width: 64 bitsSize: No Module Installed //1个内存空槽Form Factor: DIMMSet: 3Locator: DIMM6Bank Locator: Not SpecifiedType: DDR2Type Detail: SynchronousSpeed: UnknownManufacturer: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

以上就是小编为大家带来的Linux下查看CPU型号,内存大小,硬盘空间的命令(详解)全部内容了,希望大家多多支持VEVB武林网~


发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表