2C2G,4C4G,8C16G,16C32Gapp
這裏C指cpu物理核數,G指總內存大小ui
# 查看物理CPU個數spa
cat /proc/cpuinfo| grep "physical id"| sort| uniq| wc -l線程
# 查看每一個物理CPU中core的個數(即核數)內存
cat /proc/cpuinfo| grep "cpu cores"| uniqit
# 查看邏輯CPU的個數table
cat /proc/cpuinfo| grep "processor"| wc -lclass
# C=CPU總核數 = 物理CPU個數 X 每顆物理CPU的核數sed
# 總邏輯CPU數 = 物理CPU個數 X 每顆物理CPU的核數 X 超線程數file
# 查看CPU信息(型號)
cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq -c
查看內存信息
cat /proc/meminfo
出現
MemTotal: 3924384 kB
MemFree: 3245376 kB
Buffers: 46976 kB
Cached: 518592 kB
SwapCached: 0 kB
Active: 322948 kB
Inactive: 254560 kB
Active(anon): 11948 kB
Inactive(anon): 184 kB
Active(file): 311000 kB
Inactive(file): 254376 kB
Unevictable: 0 kB
Mlocked: 0 kB
SwapTotal: 2097148 kB
SwapFree: 2097148 kB
Dirty: 0 kB
Writeback: 0 kB
AnonPages: 11944 kB
Mapped: 7572 kB
Shmem: 196 kB
Slab: 55920 kB
SReclaimable: 34876 kB
SUnreclaim: 21044 kB
KernelStack: 920 kB
PageTables: 1320 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
WritebackTmp: 0 kB
CommitLimit: 4059340 kB
Committed_AS: 101108 kB
VmallocTotal: 34359738367 kB
VmallocUsed: 20268 kB
VmallocChunk: 34359715628 kB
HardwareCorrupted: 0 kB
AnonHugePages: 0 kB
HugePages_Total: 0
HugePages_Free: 0
HugePages_Rsvd: 0
HugePages_Surp: 0
Hugepagesize: 2048 kB
DirectMap4k: 6016 kB
DirectMap2M: 2091008 kB
DirectMap1G: 2097152 kB
c2b-perf-b-4-[appuser@c2b-perf-b-4 ~]$
而後第一個數據MemTotal: 3924384 kB/1024/1024,從KB換算成MB最後到GB,約等於4G。
2G,4G,16G,32G對好比下:
MemTotal | ||
kB | MB | GB |
1922200 | 954.4190665 | 2 |
3924384 | 3832.40625 | 4 |
16333736 | 15950.91406 | 16 |
32879524 | 32108.91016 | 32 |