linux查看cpu,内存

查看服务器型号、序列号:

[root@debian /home]# dmidecode|grep "System Information" -A9|egrep  "Manufacturer|Product|Serial"
    Manufacturer: Dell Inc.
    Product Name: PowerEdge R420
    Serial Number: GZB7ZY1

Linux 查看内存的插槽数,已经使用多少插槽.每条内存多大:

[root@debian /home]# dmidecode|grep -A5 "Memory Device"|grep Size|grep -v Range
    Size: 8192 MB
    Size: 8192 MB
    Size: No Module Installed
    Size: No Module Installed
    Size: No Module Installed
    Size: No Module Installed
    Size: No Module Installed
    Size: No Module Installed
    Size: No Module Installed
    Size: No Module Installed
    Size: No Module Installed
    Size: No Module Installed
[root@debian /home]# 

Linux 查看内存的频率:

[root@debian /home]# dmidecode|grep -A16 "Memory Device"|grep 'Speed' 
    Speed: 1333 MHz
    Speed: 1333 MHz
    Speed: Unknown
    Speed: Unknown
    Speed: Unknown
    Speed: Unknown
    Speed: Unknown
    Speed: Unknown
    Speed: Unknown
    Speed: Unknown
    Speed: Unknown
    Speed: Unknown
[root@debian /home]# 

查看cpu的统计信息:

[root@debian /home]# lscpu     
Architecture:          x86_64
CPU op-mode(s):        32-bit, 64-bit
Byte Order:            Little Endian
CPU(s):                12
On-line CPU(s) list:   0-11
Thread(s) per core:    2
Core(s) per socket:    6
Socket(s):             1
NUMA node(s):          1
Vendor ID:             GenuineIntel
CPU family:            6
Model:                 45
Model name:            Intel(R) Xeon(R) CPU E5-2420 0 @ 1.90GHz
Stepping:              7
CPU MHz:               1199.746
CPU max MHz:           2400.0000
CPU min MHz:           1200.0000
BogoMIPS:              3799.60
Virtualization:        VT-x
L1d cache:             32K
L1i cache:             32K
L2 cache:              256K
L3 cache:              15360K
NUMA node0 CPU(s):     0-11

.查看/proc/cpuinfo,可以知道每个cpu信息,如每个CPU的型号,主频等:

[root@debian /home]# cat /proc/cpuinfo
processor   : 0
vendor_id   : GenuineIntel
cpu family  : 6
model       : 45
model name  : Intel(R) Xeon(R) CPU E5-2420 0 @ 1.90GHz
stepping    : 7

cpu物理数

[root@debian /home]# grep "physical id" /proc/cpuinfo  | sort -u
physical id : 0

查看cpu核心数

[root@debian /home]#  grep 'core id' /proc/cpuinfo | sort -u | wc -l
6

线程数

[root@debian /home]# grep 'processor' /proc/cpuinfo | sort -u | wc -l
12

3 分享

您可以选择一种方式赞助本站

支付宝扫码赞助

支付宝扫码赞助

日期: 2015-12-10分类: Sys Basics

标签: linux基础

发表评论