Skip to content

Instantly share code, notes, and snippets.

@ipan
Created January 16, 2018 06:42
Show Gist options
  • Save ipan/a19c73cee2bb605b6838d41878eb9b73 to your computer and use it in GitHub Desktop.
Save ipan/a19c73cee2bb605b6838d41878eb9b73 to your computer and use it in GitHub Desktop.
query the number of CPU cores #nproc #lscpu
$ nproc
32
$ lscpu
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 32
On-line CPU(s) list: 0-31
Thread(s) per core: 2
Core(s) per socket: 8
Socket(s): 2
NUMA node(s): 2
Vendor ID: GenuineIntel
CPU family: 6
Model: 45
Stepping: 7
CPU MHz: 2899.898
BogoMIPS: 5800.85
Virtualization: VT-x
L1d cache: 32K
L1i cache: 32K
L2 cache: 256K
L3 cache: 20480K
NUMA node0 CPU(s): 0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30
NUMA node1 CPU(s): 1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31
$ grep 'model name' /proc/cpuinfo | wc -l
32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment