In linux systems it is easy to check the cpu information. There is a file named /proc/cpuinfo which contains all the cpu information.
less /proc/cpuinfo
Understanding whether the processor is 32 bit or 64 bit
If you can see ‘lm’ in the flags section of cpuinfo then your processor is 64 bit. A 32 bit processor dont have this lm flags. All X86-64 cpus have it and no 32 bit cpus dont have it.
Sample output
flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt lm 3dnowext 3dnow pni cx16 lahf_lm cmp_legacy svm cr8legacy ts fid vid ttp tm stc
grep flags /proc/cpuinfo
use this command to output only flag section from the cpuinfo, then you can easily check that.
How many physical processors are there?
$ grep ‘physical id’ /proc/cpuinfo | sort | uniq | wc -l
2
How many virtual processors are there?
$ grep ^processor /proc/cpuinfo | wc -l
4
Are the processors dual-core (or multi-core)?
$ grep ‘cpu cores’ /proc/cpuinfo
cpu cores : 2
cpu cores : 2
cpu cores : 2
cpu cores : 2
“2″ indicates the two physical processors are dual-core, resulting in 4 virtual processors.
If “1″ was returned, the two physical processors are single-core. If the processors are single-core, and the number of virtual processors is greater than the number of physical processors, the CPUs are using hyper-threading.
Hyper-threading is supported if ht is present in the CPU flags and you are using an SMP kernel.
