by richard on Wed, 2011-09-14 15:58
So, I was downloading Debian today, to help a friend install it on his server tomorrow. The server is currently running Debian 32-bit, and is sitting in his garage. It struck me that the server is not too old, so might be 64-bit, but I wasn't sure. Rather than downloading both CDs, I decided that there must be a way to tell if the CPU is 64-bit from the operating system. Sure enough, after a bit of googling, I found instructions. It's actually really easy. If you run: richard@bx296:~ cat /proc/cpuinfo | grep flags then it will output something like:
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 pbe cid
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 pbe cid
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 pbe cid
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 pbe cid
There are four lines because the OS sees four processors. In actual fact, there are only two physical processors, but both have two cores. So, the flag you are looking for is lm. This server doesn't have it, which tells me that it is a 32-bit CPU, but if it did have it, then I would know that it was 64-bit.
Tags: