![如何查看分配给我的 VPS 的 CPU 数量?](https://linux22.com/image/175064/%E5%A6%82%E4%BD%95%E6%9F%A5%E7%9C%8B%E5%88%86%E9%85%8D%E7%BB%99%E6%88%91%E7%9A%84%20VPS%20%E7%9A%84%20CPU%20%E6%95%B0%E9%87%8F%EF%BC%9F.png)
我购买了一个 VPS 服务,据称可以提供 4 个核心,总功率为 6GHz。我已经在这个VPS上安装了CentOS 8,想检查我是否有那个CPU能力?
这是我通过命令得到的信息lscpu
:
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 4
On-line CPU(s) list: 0-3
Thread(s) per core: 1
Core(s) per socket: 4
Socket(s): 1
NUMA node(s): 1
Vendor ID: GenuineIntel
CPU family: 6
Model: 63
Model name: Intel(R) Xeon(R) CPU E5-1650 v3 @ 3.50GHz
Stepping: 2
CPU MHz: 3491.914
BogoMIPS: 6983.82
Hypervisor vendor: KVM
Virtualization type: full
L1d cache: 32K
L1i cache: 32K
L2 cache: 4096K
L3 cache: 16384K
NUMA node0 CPU(s): 0-3
答案1
您可以计算处理器的数量:
grep -c "Model name" /proc/cpuinfo
但你已经在问题帖子中回答了
CPU(s): 4
答案2
最简单的方法:
nproc
示例输出:
4