linux 内存cpu暴增,查看linux内存、cpu

1.查看cpu数

多核cpu,包括物理多核和逻辑多核,一台机器可能有多个cpu,每个cpu可能有多核的,多个可能包括物理多核和逻辑多核。

/proc/cpuinfo 文件里记录了这些信息,以下是一个核的信息:

processor : 3

vendor_id : GenuineIntel

cpu family : 6

model : 13

model name : QEMU Virtual CPU version (cpu64-rhel6)

stepping : 3

cpu MHz : 2299.998

cache size : 4096 KB

physical id : 0

siblings : 4

core id : 1

cpu cores : 2

apicid : 3

fpu : yes

fpu_exception : yes

cpuid level : 4

wp : yes

flags : fpu de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx lm pni cx16 lahf_lm

bogomips : 4599.31

clflush size : 64

cache_alignment : 64

address sizes : 46 bits physical, 48 bits virtual

power management:

统计cpu数:grep 'physical id' /proc/cpuinfo | sort | uniq | wc -l

统计总核:cat /proc/cpuinfo |grep 'processor'|wc -l

统计物理核:grep "cpu cores" /proc/cpuinfo

‍2.查看内存

(1)cat /proc/meminfo

(2)free 参数 -g -m 等表示单位为G,M

(3)top

3.查看系统位数

getconf LONG_BIT

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值