LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-30-2009, 10:38 AM   #1
mokku
Member
 
Registered: Feb 2007
Posts: 197

Rep: Reputation: 30
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.
 
Old 01-30-2009, 10:53 AM   #2
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181
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.
 
Old 01-30-2009, 12:47 PM   #3
farslayer
LQ Guru
 
Registered: Oct 2005
Location: Willoughby, Ohio
Distribution: linuxdebian
Posts: 7,232
Blog Entries: 5

Rep: Reputation: 190Reputation: 190
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..

Last edited by farslayer; 01-30-2009 at 12:48 PM.
 
Old 01-30-2009, 01:16 PM   #4
lazlow
Senior Member
 
Registered: Jan 2006
Posts: 4,362

Rep: Reputation: 172Reputation: 172
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 ?
 
Old 01-30-2009, 01:24 PM   #5
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181
Quote:
Originally Posted by lazlow View Post
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
64 bit cpu-64 bit Ubuntu-are there 32 bit app issues? sofasurfer Ubuntu 7 04-09-2014 03:02 PM
how to check linux kernel is 32 bit or 64 bit surprise_frnd Linux - General 13 10-16-2012 10:55 AM
WHICH server??? I'm a bit overwhelmed!!! DarkFlame Linux - Server 25 06-17-2009 08:46 PM
32 bit or 64 bit install - is 32 bit easier for a newbie? dms05 Linux - Newbie 3 05-19-2006 04:05 PM
What 64 bit OS for Opteron server jedimastermopar General 10 02-24-2005 02:37 PM


All times are GMT -5. The time now is 04:43 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration