May 16, 2015 at 20:32 #295Griffin LocheParticipant
I have a HP x86_64 Linux server running on RHEL / Debian Linux 6.x, how can I find out the number of CPU cores available?
May 16, 2015 at 20:37 #296wangariParticipant
Start by using the Iscpu or nproc command to show the number of processing units. These are those available to the current process. They may be less than the number of online processors. It is worth noting that not all servers support hotplug a CPU on a running linux system.
Proc file system is a pseudo-file system used as an interface to kernel data structures. Generally it is mounted at /proc. The /proc/cpuinfo file is a collection of CPU and system architecture dependent items. A different list for each supported architecture. One of the common entries is processor, this gives CPU number. Bogomips; a system constant that is calculated during kernel initialization is the second. The SMP machines have information for each CPU.
The nproc command shows the number of processing units available:
lscpu collects CPU architecture information form /proc/cpuinfon in human-read-able format:
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
On-line CPU(s) list: 0-7
Thread(s) per core: 1
Core(s) per socket: 4
CPU socket(s): 2
NUMA node(s): 1
Vendor ID: GenuineIntel
CPU family: 6
CPU MHz: 1866.669
L1d cache: 32K
L1i cache: 32K
L2 cache: 4096K
NUMA node0 CPU(s): 0-7
The /proc/cpuinfo and sysfs stores your CPU architecture info e.g number of threads, CPUs, sockets, cores, NUMA nodes, info on CPU caches, CPU family, model, bogoMIPS, yte order and much more:
# less /proc/cpuin
You must be logged in to reply to this topic.