Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

When running cat /proc/cpuinfo under Linux, a variety information is kicked-back. For example:

> cat /proc/cpuinfo
processor   : 0
vendor_id   : GenuineIntel
cpu family  : 6
model       : 15
model name  : Intel(R) Xeon(R) CPU            5130  @ 2.00GHz
stepping    : 6
cpu MHz     : 1995.069
cache size  : 4096 KB
physical id : 0
siblings    : 2
core id     : 0
cpu cores   : 2
fpu     : yes
fpu_exception   : yes
cpuid level : 10
wp      : yes
flags       : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall nx lm constant_tsc pni monitor ds_cpl vmx tm2 cx16 xtpr lahf_lm
bogomips    : 3991.76
clflush size    : 64
cache_alignment : 64
address sizes   : 36 bits physical, 48 bits virtual
power management:

processor   : 1
vendor_id   : GenuineIntel
cpu family  : 6
model       : 15
model name  : Intel(R) Xeon(R) CPU            5130  @ 2.00GHz
stepping    : 6
cpu MHz     : 1995.069
cache size  : 4096 KB
physical id : 3
siblings    : 2
core id     : 0
cpu cores   : 2
fpu     : yes
fpu_exception   : yes
cpuid level : 10
wp      : yes
flags       : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall nx lm constant_tsc pni monitor ds_cpl vmx tm2 cx16 xtpr lahf_lm
bogomips    : 3989.46
clflush size    : 64
cache_alignment : 64
address sizes   : 36 bits physical, 48 bits virtual
power management:

First, what does all of that actually mean? I see I have a processor 0 and processor 1. Does that mean Linux is reporting both cores of the CPU, or, since it is a VM, the two that I happen to have right now (even if they're on physically different CPUs)?

Second, how can I get a similar information dump form the command line in Windows?

Third, is there a way using either platform to determine the number of physical CPUs versus total CPU cores?

share|improve this question
add comment

2 Answers

up vote 5 down vote accepted

To answer your first question: http://www.richweb.com/cpu_info describes all the cpuinfo output in good detail with some interesting discussion following the article.

In your case it's reporting that your VM is configured to show itself to the OS as a two-physical-core VM. The bare metal under the VM might be 1 core or 100 cores but as far as the OS in the VM is concerned you've got a machine with two physical processors that it can play with. It knows nothing of how threads that it assigns to those processors are actually being run on the physical hardware underneath the VM.

To get somewhat similar information from a Windows CMD shell you can try the systeminfo command from a CMD shell. It displays a whole lot more than the /proc/cpuinfo stuff in Linux, but also not quite as much detail about the actual processors themselves.

I don't know the answer to your third question, sorry.

share|improve this answer
    
was not familiar with systeminfo .. very cool tool, though :) –  warren Sep 9 '10 at 18:48
    
AmirW was able to find the info in cpuinfo that has the physical IDs (superuser.com/questions/186682/…) –  warren Sep 10 '10 at 19:20
add comment

Re third question:

in cpuinfo, there is a field "physical id", it's unique per physical CPU. Cores of the same CPU are reported as different processors with the same physical id, while physically separate processors will have different physical ids.

Notice that if you're on a VM, you cannot know anything about the actual hardware (CPU, etc), all you know is what the VM tells you. So, for example, if your physical machine has 1 Quad core CPU, and your VM is configured to report 2 single core CPUs, you'll see 2 single core CPUs in cpuinfo (i.e. 2 processors with different physical id).

share|improve this answer
1  
thanks, AmirW - the exact command I'm using that returns that to me is: cat /proc/cpuinfo | grep physical | grep id | sort -u | wc -l –  warren Sep 10 '10 at 19:20
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.