发布于 2016-11-29 13:36:36 | 216 次阅读 | 评论: 0 | 来源: 网友投递

这里有新鲜出炉的Linux常用命令,程序狗速度看过来!

Linux

Linux是一套免费使用和自由传播的类Unix操作系统,是一个基于POSIX和UNIX的多用户、多任务、支持多线程和多CPU的操作系统。它能运行主要的UNIX工具软件、应用程序和网络协议。


下面小编就为大家带来一篇Linux下查看CPU型号,内存大小,硬盘空间的命令(详解)。小编觉得挺不错的,现在就分享给大家,也给大家做个参考。一起跟随小编过来看看吧

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

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



最新网友评论  共有(0)条评论 发布评论 返回顶部

Copyright © 2007-2017 PHPERZ.COM All Rights Reserved   冀ICP备14009818号  版权声明  广告服务