How can I get the number of hardware level threads in my computer?
By Mia Morrison •
How can I get the number of hardware level threads in my computer using the ubuntu terminal?
1 Answer
Using 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: 2
Core(s) per socket: 2
Socket(s): 1
NUMA node(s): 1
Vendor ID: GenuineIntel
CPU family: 6
Model: 69
Stepping: 1
CPU MHz: 806.347
BogoMIPS: 4988.30
Virtualization: VT-x
L1d cache: 32K
L1i cache: 32K
L2 cache: 256K
L3 cache: 3072K
NUMA node0 CPU(s): 0-3The OS recognizes each hardware thread as a different CPU. The number you want is show at line CPU(s):, which is the same as multiplying Thread(s) per core:, Core(s) per socket: and Socket(s):.
Or you can use a single command:
lscpu -p | grep -c "^[0-9]" More in general
"Zoraya ter Beek, age 29, just died by assisted suicide in the Netherlands. She was physically healthy, but psychologically depressed. It's an abomination that an entire society would actively facilitate, even encourage, someone ending their own life because they had no hope. Th…"