linux查看cpu,内存

2023年 7月 16日 64.1k 0

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

[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

请输入图片描述

相关文章

服务器端口转发,带你了解服务器端口转发
服务器开放端口,服务器开放端口的步骤
产品推荐:7月受欢迎AI容器镜像来了,有Qwen系列大模型镜像
如何使用 WinGet 下载 Microsoft Store 应用
百度搜索:蓝易云 – 熟悉ubuntu apt-get命令详解
百度搜索:蓝易云 – 域名解析成功但ping不通解决方案

发布评论