"You will never come up against a greater adversary than your own potential." -- Star Trek: The Next Generation 'Evolution'
I recently had to determine if a server running SUSE Linux had 64-bit processors or not. I did the usual stuff -- check the machine specs, which just said Xeon processor without explicitly stating 64-bit, then checked the kernel version, which listed itself as running on i686 rather than x86_64.
There had to be some way of either getting the specific processor model or some information about the hardware that would tell me for sure. After much Googling and gnashing of teeth, I found it.
At your command line enter cat /proc/cpuinfo and this will dump information for each core of each physical processor. The line to look at is "flags". As an example, the flags for my desktop Intel Pentium 4 list these:
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 pbe lm constant_tsc pebs bts pni dtes64 monitor ds_cpl cid cx16 xtpr lahf_lm
The "lm" flag I've highlighted stands for "long mode" as basically means that the processor is 64-bit. The complete set of flags is included in the cpufeature.h file in the Linux kernel headers.
No comments:
Post a Comment