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 Provided
Total Width: 72bits
Data Width: 64bits
Size: 2048 MB //1条2G内存
Form Factor:DIMM
Set: 1Locator:DIMM1
Bank Locator:Not Specified
Type:DDR2
Type Detail:Synchronous
Speed: 667MHz
Manufacturer:7F7F7F7F7F510000
SerialNumber: 0403E324Asset Tag: 450721PartNumber:72T256220HR3SA--Memory DeviceArray Handle: 0x1000Error Information Handle:Not Provided
Total Width: 72bits
Data Width: 64bits
Size: 2048 MB //1条2G内存
Form Factor:DIMM
Set: 1Locator:DIMM2
Bank Locator:Not Specified
Type:DDR2
Type Detail:Synchronous
Speed: 667MHz
Manufacturer:7F7F7F7F7F510000
SerialNumber: 0403E324Asset Tag: 450721PartNumber:72T256220HR3SA--Memory DeviceArray Handle: 0x1000Error Information Handle:Not Provided
Total Width: 72bits
Data Width: 64bits
Size: No Module Installed //1个内存空槽
Form Factor:DIMM
Set: 2Locator:DIMM3
Bank Locator:Not Specified
Type:DDR2
Type Detail:Synchronous
Speed:Unknown
Manufacturer:SerialNumber:Asset Tag:PartNumber:
--Memory DeviceArray Handle: 0x1000Error Information Handle:Not Provided
Total Width: 72bits
Data Width: 64bits
Size: No Module Installed //1个内存空槽
Form Factor:DIMM
Set: 2Locator:DIMM4
Bank Locator:Not Specified
Type:DDR2
Type Detail:Synchronous
Speed:Unknown
Manufacturer:SerialNumber:Asset Tag:PartNumber:
--Memory DeviceArray Handle: 0x1000Error Information Handle:Not Provided
Total Width: 72bits
Data Width: 64bits
Size: No Module Installed //1个内存空槽
Form Factor:DIMM
Set: 3Locator:DIMM5
Bank Locator:Not Specified
Type:DDR2
Type Detail:Synchronous
Speed:Unknown
Manufacturer:SerialNumber:Asset Tag:PartNumber:
--Memory DeviceArray Handle: 0x1000Error Information Handle:Not Provided
Total Width: 72bits
Data Width: 64bits
Size: No Module Installed //1个内存空槽
Form Factor:DIMM
Set: 3Locator:DIMM6
Bank Locator:Not Specified
Type:DDR2
Type Detail:Synchronous
Speed:Unknown
Manufacturer:SerialNumber:Asset Tag:PartNumber:
总结:该服务器有两条2G内存 ,空余4个插槽
3 查看硬盘
3.1 查看硬盘大小
# fdisk -l | grep Disk
Disk /dev/cciss/c0d0: 146.7 GB, 146778685440 bytes
总结:硬盘大小146.7G,即厂商标称的160G
4 查看系统剩余空间
4.1 查看系统整体空间剩余情况
在命令行中输入“df -h”可以查看系统的分配,已使用和可用情况。如下图:
4.2 查看每个文件夹的占用情况
在命令行中输入 “du -sh *”可以查看每个文件夹的大小。此举可以快速定位大文件所存在的位置。
4.3 查看当前文件夹下有多少文件
在命令行中输入“ls |wc -l”即可查看当前目录下的文件和文件夹数。
原文:http://www.jb51.net/article/97157.htm
原文:https://www.cnblogs.com/ivy-zheng/p/12467283.html