Checking the CPUID info under Linux
I wanted to find out if my CPU was 64 bit capable. It was a few years old, so probably not, but I figured I should be able to get linux to tell me without having to lookup the hardware spec of the box and then check the Intel website.
First I checked the cpuinfo data that linux provides (in this case, my trusty CentOS 5.2 installation):
[andy@vm rpm]$ cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 15
model : 2
model name : Intel(R) Xeon(TM) CPU 2.40GHz
stepping : 9
cpu MHz : 2386.429
cache size : 512 KB
physical id : 0
siblings : 2
core id : 0
cpu cores : 1
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 2
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts cpi mmx fxsr sse sse2 ss ht tm pbe cid xtpr
bogomips : 4775.09
processor : 1
vendor_id : GenuineIntel
cpu family : 15
model : 2
model name : Intel(R) Xeon(TM) CPU 2.40GHz
stepping : 9
cpu MHz : 2386.429
cache size : 512 KB
physical id : 0
siblings : 2
core id : 0
cpu cores : 1
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 2
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts cpi mmx fxsr sse sse2 ss ht tm pbe cid xtpr
bogomips : 4772.09
Interesting, but no smoking 64 bit gun.
I then found a utility called CPUID which seemed to report much more interesting data.
First fetch the rpm: wget http://www.etallen.com/cpuid/cpuid-20060917-1.i386.rpm
Then install it: sudo yum --nogpgcheck localinstall cpuid-20060917-1.i386.rpm
At this point, yum whimpered with
Existing lock /var/run/yum.pid: another copy is running as pid xxxx
Another app is currently holding the yum lock; waiting for it to exit...
Another app is currently holding the yum lock; waiting for it to exit...
I checked around to see who was holding the lock, but i seems it was just a left over from some prior operation. So as root, I deleted the file /var/run/yum.pid and tried the install again.
This time it worked fine and I was then able to run CPUID:
CPU:
vendor_id = "GenuineIntel"
version information (1/eax):
processor type = primary processor (0)
family = Intel Pentium 4/Pentium D/Pentium Extreme Edition/Celeron/Xeon/Xeon MP/Itanium2, AMD Athlon 64/Athlon XP-M/Opteron/Sempron/Turion (15)
model = 0x2 (2)
stepping id = 0x9 (9)
extended family = 0x0 (0)
extended model = 0x0 (0)
(simple synth) = Intel Pentium 4 (Northwood D1) / Xeon (Prestonia D1) / Mobile Pentium 4 (Northwood D1) / Mobile Pentium 4 Processor-M (Northwood D1) / Celeron 478-pin, .13um
miscellaneous (1/ebx):
process local APIC physical ID = 0x1 (1)
cpu count = 0x2 (2)
CLFLUSH line size = 0x8 (8)
brand index = 0xb (11)
brand id = 0x0b (11): Intel Xeon, .13um
feature information (1/edx):
x87 FPU on chip = true
virtual-8086 mode enhancement = true
debugging extensions = true
page size extensions = true
time stamp counter = true
RDMSR and WRMSR support = true
physical address extensions = true
machine check exception = true
CMPXCHG8B inst. = true
APIC on chip = true
SYSENTER and SYSEXIT = true
memory type range registers = true
PTE global bit = true
machine check architecture = true
conditional move/compare instruction = true
page attribute table = true
page size extension = true
processor serial number = false
CLFLUSH instruction = true
debug store = true
thermal monitor and clock ctrl = true
MMX Technology = true
FXSAVE/FXRSTOR = true
SSE extensions = true
SSE2 extensions = true
self snoop = true
hyper-threading / multi-core supported = true
therm. monitor = true
IA64 = false
pending break event = true
feature information (1/ecx):
PNI/SSE3: Prescott New Instructions = false
MONITOR/MWAIT = false
CPL-qualified debug store = false
VMX: virtual machine extensions = false
Enhanced Intel SpeedStep Technology = false
thermal monitor 2 = false
context ID: adaptive or shared L1 data = true
cmpxchg16b available = false
xTPR disable = true
cache and TLB information (2):
0x50: instruction TLB: 4K & 2M/4M pages, 64 entries
0x5b: data TLB: 4K & 4M pages, 64 entries
0x66: L1 data cache: 8K, 4-way, 64 byte lines
0x40: No L3 cache
0x70: Trace cache: 12K-uop, 8-way
0x7b: L2 cache: 512K, 8-way, sectored, 64 byte lines
extended feature flags (0x80000001/edx):
SYSCALL and SYSRET instructions = false
execution disable = false
64-bit extensions technology available = false
Intel feature flags (0x80000001/ecx):
LAHF/SAHF supported in 64-bit mode = false
brand = " Intel(R) Xeon(TM) CPU 2.40GHz"
(multi-processing synth): hyper-threaded (t=2)
(synth) = Intel Xeon (Prestonia D1), .13um
And so I had my answer: 64-bit extensions technology available = false
June 15th, 2009 at 7:41 am
U could have used “dmidecode” bro’
April 30th, 2010 at 11:57 am
Another way to check is to just look at the “flags:” line for the “lm” entry. No “lm” and you have a 32-bit chip.