安装后用lscpu可以很方便的得到:
$ lscpu | grep -E 'Thread|Core|Socket|CPU('
CPU(s): 56
Thread(s) per core: 2
Core(s) per socket: 14
Socket(s): 2
其中socket代表物理cpu个数, Core(s) per socket就是每个cpu多少核,Thread(s) per core就是每个核几个超线程
CPUs = Threads per core X cores per socket X sockets
引用:
https://unix.stackexchange.com/questions/218074/how-to-know-number-of-cores-of-a-system-in-linux
网友评论