LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 08-22-2007, 01:31 PM   #1
mfb
LQ Newbie
 
Registered: Aug 2007
Posts: 20

Rep: Reputation: 0
32 or 64 bit processor


Operating System RedHat Enterprise 4

Is there a command to determine if your processor is 32 or 64 ?
 
Old 08-22-2007, 01:50 PM   #2
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978
Code:
uname -p
if output is x86_64 it is a 64bit processor, if it is i686 (or similar) the cpu is 32bit. Sometimes the output is unknown, but I've never seen it!
 
Old 08-22-2007, 03:11 PM   #3
farslayer
LQ Guru
 
Registered: Oct 2005
Location: Northeast Ohio
Distribution: linuxdebian
Posts: 7,241
Blog Entries: 5

Rep: Reputation: 190Reputation: 190
Looks like I have one of those instances..
Code:
it-etch:/etc# uname -p
unknown
lets try another approach
Code:
it-etch:/etc# cat /proc/cpuinfo
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 15
model           : 4
model name      : Intel(R) Pentium(R) D CPU 2.80GHz
stepping        : 7
cpu MHz         : 2800.329
cache size      : 1024 KB
physical id     : 0
siblings        : 2
core id         : 0
cpu cores       : 2
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 5
wp              : yes
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
bogomips        : 5605.53

processor       : 1
vendor_id       : GenuineIntel
cpu family      : 15
model           : 4
model name      : Intel(R) Pentium(R) D CPU 2.80GHz
stepping        : 7
cpu MHz         : 2800.329
cache size      : 1024 KB
physical id     : 0
siblings        : 2
core id         : 1
cpu cores       : 2
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 5
wp              : yes
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
bogomips        : 5600.59

cat /proc/cpuinfo didn't provide any info lets see what lshw reveals


Code:
it-etch:/etc# lshw


     *-cpu
          description: CPU
          product: Intel(R) Pentium(R) D CPU 2.80GHz
          vendor: Intel Corp.
          physical id: 400
          bus info: cpu@0
          version: 15.4.7
          serial: 0000-0F47-0000-0000-0000-0000
          slot: Microprocessor
          size: 2800MHz
          width: 64 bits
          clock: 800MHz
          capabilities: fpu fpu_exception wp 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 x86-64 constant_tsc pni monitor ds_cpl cid cx16 xtpr lahf_lm
          configuration: id=1
        *-cache:0
             description: L1 cache
             physical id: 700
             size: 16KB
             capacity: 16KB
             capabilities: internal write-back data
        *-cache:1
             description: L2 cache
             physical id: 701
             size: 2MB
             capacity: 2MB
             capabilities: internal varies unified
        *-logicalcpu:0
             description: Logical CPU
             physical id: 1.1
             width: 64 bits
             capabilities: logical
        *-logicalcpu:1
             description: Logical CPU
             physical id: 1.2
             width: 64 bits
             capabilities: logical
eureka, when all else fails lshw still manages to pull out more info

dmidecode can also extract info from the system, lshw actually uses dmidecode to gather some info, but lshw formats the data output a lot nicer.
 
Old 08-22-2007, 03:43 PM   #4
rickh
Senior Member
 
Registered: May 2004
Location: Albuquerque, NM USA
Distribution: Debian-Lenny/Sid 32/64 Desktop: Generic AMD64-EVGA 680i Laptop: Generic Intel SIS-AC97
Posts: 4,250

Rep: Reputation: 62
Me, too.
Code:
debian64:~$ uname -p
unknown
debian64:~$
I like infobash:
Code:
debian64:~$ infobash 0
CPU[AMD Athlon 64 3200+ clocked at 1989.871 Mhz]  Kernel[Linux 2.6.22-1-amd64 x86_64]  Up[-2days-]  Mem[-226.0/436.6MB-]  HDD[-160GB(57%used)-]  Procs[-97-]  Client[Shell]
debian64:~$
 
Old 08-22-2007, 04:14 PM   #5
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978
Thank you, guys! It looks like "uname -p" does not recognize the first 64-bit processors for personal computers (Athlon64 and Pentium D). And now the op have a lot of options to retrieve the information he was looking for!

Edit: ..and just for completeness, I post results on a 32-bit machine:
Code:
linux # uname -p
i686

linux # lshw -C processor
  *-cpu
       description: CPU
       product: Genuine Intel(R) CPU           T2300  @ 1.66GHz
       vendor: Intel Corp.
       physical id: 4
       bus info: cpu@0
       version: 6.14.8
       serial: 0000-06E8-0000-0000-0000-0000
       slot: N/A
       size: 1GHz
       capacity: 1GHz
       width: 32 bits
       clock: 167MHz
       capabilities: fpu fpu_exception wp vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx constant_tsc pni monitor vmx est tm2 xtpr cpufreq
       configuration: id=0
     *-logicalcpu:0
          description: Logical CPU
          physical id: 0.1
          width: 32 bits
          capabilities: logical
     *-logicalcpu:1
          description: Logical CPU
          physical id: 0.2
          width: 32 bits
          capabilities: logical

Last edited by colucix; 08-22-2007 at 04:21 PM.
 
Old 08-22-2007, 04:36 PM   #6
farslayer
LQ Guru
 
Registered: Oct 2005
Location: Northeast Ohio
Distribution: linuxdebian
Posts: 7,241
Blog Entries: 5

Rep: Reputation: 190Reputation: 190
Quote:
Originally Posted by rickh View Post
Me, too.

I like infobash:
Code:
debian64:~$ infobash 0
CPU[AMD Athlon 64 3200+ clocked at 1989.871 Mhz]  Kernel[Linux 2.6.22-1-amd64 x86_64]  Up[-2days-]  Mem[-226.0/436.6MB-]  HDD[-160GB(57%used)-]  Procs[-97-]  Client[Shell]
debian64:~$
Did you install infobash manually ?

I fail to find infobash in any of the Debian package listing for stable, testing, or unstable...

Just curious.
 
Old 08-22-2007, 06:16 PM   #7
rickh
Senior Member
 
Registered: May 2004
Location: Albuquerque, NM USA
Distribution: Debian-Lenny/Sid 32/64 Desktop: Generic AMD64-EVGA 680i Laptop: Generic Intel SIS-AC97
Posts: 4,250

Rep: Reputation: 62
I actually activated this Sidux repo temporarily so I could install it with Aptitude.

Code:
#deb http://sidux.com/debian/ sid main
#deb-src http://sidux.com/debian/ sid main
 
Old 08-23-2007, 07:45 AM   #8
mfb
LQ Newbie
 
Registered: Aug 2007
Posts: 20

Original Poster
Rep: Reputation: 0
Smile 32 vs 64

Thanks to all for info and quick response...
 
  


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
x86_64 bit processor or not Kitana Linux - Newbie 5 05-21-2007 08:23 AM
32 bit Linux on 64 bit processor dfwjung Linux - Software 7 02-16-2007 12:13 AM
32 bit apps on 64 bit processor khaleel5000 General 12 04-19-2006 08:55 AM
64 bit processor UGT001 Linux - Newbie 2 01-09-2005 09:26 PM
64 bit processor shanenin Linux - Software 1 08-01-2004 03:37 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:57 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