Timeline for How to know number of cores of a system in Linux?
Current License: CC BY-SA 4.0
22 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Apr 28, 2024 at 21:14 | comment | added | htaccess | @Paranoid logically the heuristic still works fine: (1x16) + (2x8) = 32. I can see how this situation will make most of these commands give weird answers though :( | |
| Apr 16, 2024 at 9:13 | comment | added | Paranoid | The Threads X cores X sockets is no longer always true. My CPU (i9-13900K) lists 2 threads per core and 24 cores yet only has 32 CPUs. This is because it has 8 performance cores and 16 efficient cores. Only the performance cores have threads. | |
| May 14, 2021 at 6:08 | comment | added | avia | Thank you @htaccess for this very detailed answer. This answer should be the accepted answer and is way better for someone looking deep into this matter. | |
| Jul 6, 2019 at 1:53 | history | edited | htaccess | CC BY-SA 4.0 |
added 221 characters in body
|
| Jul 6, 2019 at 1:42 | history | edited | htaccess | CC BY-SA 4.0 |
make it clearer we are multiplying Socket\(s\) by Core\(s\) per socket
|
| Jul 6, 2019 at 1:36 | comment | added | htaccess |
@Jakub Klinkovský, thanks for pointing that out but in this case I want to actually demonstrate the multiplication of Socket(s) * Core(s) per socket. Given what I just said I guess echo Cores = $(( $(lscpu | awk '/^Socket\(s\)/{ print $2 }') * $(lscpu | awk '/^Core\(s\) per socket/{ print $4 }') )) would be better so that people can see exactly what is being multiplied ...
|
|
| Jul 5, 2019 at 7:35 | comment | added | Jakub Klinkovský |
You can also avoid awk and an explicit multiplication: lscpu --all --parse=CORE,SOCKET | grep -Ev "^#" | sort -u | wc -l
|
|
| May 17, 2019 at 1:13 | comment | added | htaccess |
I think adding lscpu --all --extended would be a useful addition but I no longer have access to these particular machines.
|
|
| Apr 25, 2018 at 4:14 | history | edited | htaccess | CC BY-SA 3.0 |
replace deprecated egrep with grep -E
|
| Jan 21, 2018 at 11:49 | history | edited | htaccess | CC BY-SA 3.0 |
link to wikipedia for CPU
|
| Jan 12, 2018 at 20:49 | history | edited | htaccess | CC BY-SA 3.0 |
add a comma
|
| Nov 15, 2017 at 0:33 | history | edited | htaccess | CC BY-SA 3.0 |
link to SMT rather than intel hyperthreading
|
| Sep 30, 2017 at 2:46 | history | edited | htaccess | CC BY-SA 3.0 |
link to wikipedia for threads, cores and sockets.
|
| Jun 16, 2017 at 23:07 | history | edited | htaccess | CC BY-SA 3.0 |
avoid grepping Core in lscpu Model name
|
| Jan 5, 2017 at 4:51 | comment | added | PickBoy |
In CentOS 6.x, dmidecode does not output Core/Thread count info, and it actually regards 'CPU' as 'CPU' or 'Core' in lscpu, not 'socket'.
|
|
| Apr 27, 2016 at 8:37 | history | edited | htaccess | CC BY-SA 3.0 |
s/times/multiply/ for clarity
|
| Apr 27, 2016 at 5:12 | history | edited | htaccess | CC BY-SA 3.0 |
shorten the cores calculation line
|
| Apr 27, 2016 at 4:39 | history | edited | htaccess | CC BY-SA 3.0 |
Add dmidecode output and a summary
|
| Apr 27, 2016 at 4:22 | history | edited | htaccess | CC BY-SA 3.0 |
add --all flag to nproc
|
| Apr 27, 2016 at 4:09 | history | edited | htaccess | CC BY-SA 3.0 |
added 39 characters in body
|
| Apr 27, 2016 at 4:08 | review | First posts | |||
| Apr 27, 2016 at 4:17 | |||||
| Apr 27, 2016 at 4:03 | history | answered | htaccess | CC BY-SA 3.0 |