LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   32 or 64 bit processor (https://www.linuxquestions.org/questions/linux-newbie-8/32-or-64-bit-processor-578976/)

mfb 08-22-2007 12:31 PM

32 or 64 bit processor
 
Operating System RedHat Enterprise 4

Is there a command to determine if your processor is 32 or 64 ?

colucix 08-22-2007 12:50 PM

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!

farslayer 08-22-2007 02:11 PM

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.

rickh 08-22-2007 02:43 PM

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:~$


colucix 08-22-2007 03:14 PM

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


farslayer 08-22-2007 03:36 PM

Quote:

Originally Posted by rickh (Post 2867202)
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.

rickh 08-22-2007 05:16 PM

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


mfb 08-23-2007 06:45 AM

32 vs 64
 
Thanks to all for info and quick response...


All times are GMT -5. The time now is 05:26 PM.