LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   how to check 32 bit server or 64 bit server? (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-check-32-bit-server-or-64-bit-server-701029/)

mokku 01-30-2009 09:38 AM

how to check 32 bit server or 64 bit server?
 
These are redhat boxes. How do I check whether these are 32 bit servers or 64 bit servers, except uname -a command.

johnsfine 01-30-2009 09:53 AM

What's wrong with using uname -a?

I probably could think of a few other commands that would get the same information. But if there is some reason uname -a isn't good enough, the same reason likely applies to other ways of getting the same information.

If you specify the constraints more clearly, you're likely to get a more useful answer.

farslayer 01-30-2009 11:47 AM

cat /proc/cpuinfo | grep lm

user@it-lenny:~$ cat /proc/cpuinfo | grep lm
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 nx lm constant_tsc pni monitor ds_cpl cid cx16 xtpr lahf_lm


The presence of the 'lm' flag indicates a 64 bit capable CPU




getconf LONG_BIT
32
I believe this should tell you if your kernel is 32 or 64 bit..

lazlow 01-30-2009 12:16 PM

farslayer
How will "getconf LONG_BIT" respond with a 32bit pau kernel (I have no idea)?

OP

I am a little curious why no uname - a ?

johnsfine 01-30-2009 12:24 PM

Quote:

Originally Posted by lazlow (Post 3426510)
farslayer
How will "getconf LONG_BIT" respond with a 32bit pau kernel

I just tested it with a 32-bit PAE kernel (on a 64-bit capable CPU) and, as expected, it responds 32.


All times are GMT -5. The time now is 11:21 PM.