

thread or virtual core: number of threads that can run on parallel on one CPU if the (intel-)processor is able to perform hyperthreading the number of virtual cores is twice the number of physical cores (I am not sure how other processor vendors call this feature).core or physical core: number of physical calculation units in the CPU.processor: the whole piece of hardware (e.g.Since everyone uses cores, CPU and processor in another context, I introduce a nomenclature for my answer here: Thus, "number behind cpu cores" x "number behind physical id + 1" is the number of physical cores one our node (8 x (3 + 1)). cpuinfo is a library to detect essential for performance optimization information about host CPU. > cat /proc/cpuinfo | grep "physical id" | tail -1 > cat /proc/cpuinfo | grep -c "cpu cores" This is the output I get: > cat /proc/cpuinfo | grep -m 1 "cpu cores" If we have such a setup, we need to consider the row physical id in cat /proc/cpuinfo. Thus, we get 64 'packages' of information.

I just looked onto one node of a computing cluster, on which I am currently working: 1 node has 4 CPUs (Intel Xeon) with each 8 physical cores each CPU supports hyptherthreading therefore, each CPU has 16 virtual cores summing it up, the one node has 32 physical and 64 virtual cores Ĭat /proc/cpuinfo prints out information for each virtual core. You could also take the last found processor number and increment it by one > cat /proc/cpuinfo | grep "processor" | tail -1 Number of virtual cores: > cat /proc/cpuinfo | grep -l "cpu cores" Number of physical cores: > cat /proc/cpuinfo | grep -m 1 "cpu cores" cpuinfo show the actual cores while htop/top show both cores and thread as cores.You most likely have 4 cores and 4 threads thats why. Lets see what I get: > cat /proc/cpuinfo | grep "cpu cores" I have got a Intel(R) Core(TM) i7-3740QM CPU 2.70GHz (4 physical cores, hyperthreading). Thus, if you want to have the number of physical core, you just take the first occurrence of the line cpu cores, which is > cat /proc/cpuinfo | grep -m 1 "cpu cores"Īlternatively, if you are looking for the number of virtual cores, you count the number of times the line cpu cores is found, which is > cat /proc/cpuinfo | grep -c "cpu cores" 2 Answers Sorted by: 21 Yes, a multi-core processor is a single piece of hardware ('one processor') that provides several cores than can work concurrently. We must look at the siblings, cpu cores and. But it prints out this information for each virtual core. A logical cpu can be a hyperthreading sibling, a shared core in a dual or quad core, or a separate physical cpu. The command cat /proc/cpuinfo should print out the number of physical cores in the line cpu cores. This may be the case if you work on a computing cluster or on a high-end desktop workstation for CAD/Engineering-purposes. See section "Several CPUs per mainboard". This might be do to how cpuinfo shows this for AMD or that specific family model. If you have more than one CPU/processor (in this sense) on your mainboard this does not properly work. cpu cores : 8 Since in your case it is showing all 8 cores, it means the CPU is detected correctly although the amount of siblings are not all shown. 2x number of physical cores with hyper threading): > cat /proc/cpuinfo | grep -c "cpu cores" The number of physical cores: > cat /proc/cpuinfo | grep -m 1 "cpu cores"
