LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Is mine a 64-bit machine? (https://www.linuxquestions.org/questions/linux-hardware-18/is-mine-a-64-bit-machine-4175502307/)

stf92 04-19-2014 02:59 PM

Is mine a 64-bit machine?
 
Hi: How can I know if the CPU is 64 bits? Well, that is the question. Some info, from /proc/cpuinfo:

Code:

processor      : 0
vendor_id      : GenuineIntel
cpu family      : 15
model          : 4
model name      : Intel(R) Celeron(R) CPU 2.26GHz
stepping        : 9


rokytnji 04-19-2014 03:06 PM

Try
Code:

lscpu
instead

rknichols 04-19-2014 03:06 PM

Look for flag "lm" (long mode) in /proc/cpuinfo.
Code:

grep " lm " /proc/cpuinfo

haertig 04-19-2014 04:10 PM

Code:

grep "address sizes" /proc/cpuinfo
If it returns something like this:
Code:

address sizes        : 48 bits physical, 48 bits virtual
address sizes        : 48 bits physical, 48 bits virtual
address sizes        : 48 bits physical, 48 bits virtual
address sizes        : 48 bits physical, 48 bits virtual
address sizes        : 48 bits physical, 48 bits virtual
address sizes        : 48 bits physical, 48 bits virtual

... then it is 64-bit. The thing to look for is "48 bits virtual", don't worry about the "physical". And don't worry that you're seeing 48 bits listed and not 64. A 64-bit CPU can address a 48 bit virtual address space.

cwizardone 04-19-2014 04:16 PM

How about, uname -a

lleb 04-19-2014 04:48 PM

Quote:

Originally Posted by cwizardone (Post 5155681)
How about, uname -a

that will give you the kernel info, not the CPU info.

stf92 04-19-2014 05:30 PM

/proc/cpuinfo in my box does not give address sizes for this machine and, hence, likely for any other one. But I know the CPU is Intel Celeron D, bearing 'SL8HH' on the microprocessor top. And this page,

http://www.cpu-world.com/CPUs/Celeron_D/index.html

under 'Show all' 'Hide all' says:

Bus width: 32-bit

Whether this tells the CPU is 32 bits I don't know. One thing is the electrical bus width and another one the register width, a processor being called 64-bit (resp. 32-bit) depending on the register bit, I think. For example, in 64 bits, the AX,BX,CX,DX,SP,BP,SI,DI registers are 64-bit registers.

Furthermore, I had in my hands the Pentium I electrical specifications and by them I came to know its data bus consists of 64 lines, that is, it has a 64-bit wide data bus.

cwizardone 04-19-2014 05:32 PM

Quote:

Originally Posted by lleb (Post 5155702)
that will give you the kernel info, not the CPU info.

It will also give you the CPU information, e.g.,

Quote:

bash-4.2$ uname -a
Linux darkstar 3.10.30 #2 SMP Fri Feb 14 19:46:22 CST 2014 x86_64 Intel(R)......

johnsfine 04-19-2014 05:46 PM

Post 2 gave an easy answer if you happen to have the lscpu program installed.

Post 3 gave a really robust answer (not easy for it to fail or be wrong). But I guess you didn't quite understand it or ignored it.

Post #4, I'm not so sure of. On a 64-bit kernel it acts as described. But I'm not sure with a 32-bit kernel if it would distinguish a 32-bit from 64-bit CPU.

Post #5, really just tells you whether the kernel is 64-bit not whether the CPU is 64-bit.

Quote:

Originally Posted by cwizardone (Post 5155714)
It will also give you the CPU information, e.g.,

It doesn't help anyone for you to repeat your mistake after corrected by someone who knows better.

If you have a 64-bit kernel (as you showed) then of course you have a 64-bit CPU. But we are assuming the OP has a 32-bit kernel and doesn't know whether the CPU is 64-bit.

uname running under a 32-bit kernel cannot tell you whether you have a 64-bit CPU. What you think is CPU info within uname -a is not really what you think.


Quote:

Originally Posted by stf92 (Post 5155713)
/proc/cpuinfo in my box does not give address sizes for this machine and, hence, likely for any other one.

Try one of the other methods suggested, especially looking for the lm on the flags line in /proc/cpuinfo. lm stands for "long mode". It tells you the CPU is able to run a 64-bit kernel and it is information that is available even if you happen to be running a 32-bit kernel on that CPU.

Quote:

Originally Posted by stf92 (Post 5155713)
One thing is the electrical bus width and another one the register width, a processor being called 64-bit (resp. 32-bit) depending on the register bit, I think. For example, in 64 bits, the AX,BX,CX,DX,SP,BP,SI,DI registers are 64-bit registers.

An x86 CPU is called 64-bit if those registers (the ones that can be used for virtual addresses) are 64-bit.

An x86 CPU has a lot of different buses and their sizes vary by model and none of that is responsible for the official bit-size of the processor.

The bit size measures the virtual address size, which is 32-bits when running a 32-bit kernel and is 64-bits (though only 48 independent bits) when running a 64-bit kernel.

A 32-bit CPU cannot run a 64-bit kernel. A 64-bit CPU can run either a 32-bit kernel or a 64-bit kernel.

stf92 04-19-2014 06:18 PM

@johnsfine:

Firstly, I do not need to be lectured. I think it is you who does not care reading the posts, namely post #7. I gave very specific information, which can resumed in this: the CPU sSpec is SL8HH.

This page gives a definite answer to the thread's question: http://ark.intel.com/products/27105/...Hz-533-MHz-FSB

given that SL8HH corresponds to processor number 315. There it says:
Quote:

Instruction set: 32-bit
That is, I am here being informed by Intel itself. I repeat. Don't come to me with sermons. LQ is not an oracle nor does it intend to be one (as far as I know).

[It seems you read that post after all, while I was writing mine]

rknichols 04-19-2014 06:32 PM

deleted


All times are GMT -5. The time now is 04:01 AM.