How do you check how many cores you have Linux?

Đăng Khánh

New member
How do you check how many cores you have Linux?
Answer
You can use one of the following methods to determine the number of physical CPU cores.
  1. Count the number of unique core ids (roughly equivalent to grep -P ‘^core id\t’ /proc/cpuinfo. |
  2. Multiply the number of ‘cores per socket’ by the number of sockets.
  3. Count the number of unique logical CPU’s as used by the Linux kernel.
Photo in the article by “小鑫的GNU/Linux学习网站- 小鑫博客”
Code:
https://linux.xiazhengxin.name/index.php?m=06&y=11&entry=entry110601-195440
 

Tìm kiếm

Back
Top