proper way to determine arch of *installed* OS, not processor?
Chris Jones
jonesc at hep.phy.cam.ac.uk
Fri May 6 19:40:47 UTC 2011
>
> i'm not sure that's correct, and i know this question comes up on
> occasion. in fact, a quick google found this:
>
> http://stackoverflow.com/questions/246007/how-to-determine-whether-a-given-linux-is-32-bit-or-64-bit
>
> where someone first suggests "uname -m", but a followup claims that
> that command with a 32-bit debian OS on a 64-bit system claims 64
> bits, which is not the answer one would want.
>
> i ask since i'm looking at a startup script for software i just
> downloaded where that wrapper reads:
I have access to a machine that has 32 bit SLC4 installed. uname gives
pcfl ~ > uname -i
i386
whereas
pcfl ~ > cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 15
model : 4
model name : Intel(R) Xeon(TM) CPU 3.20GHz
stepping : 3
cpu MHz : 3192.750
cache size : 2048 KB
physical id : 0
siblings : 2
core id : 0
cpu cores : 1
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 xtpr
bogomips : 6388.12
<snip other cores>
note the lm in the flags. This means the machine is 64 bit capable.
I'm pretty (say 99.5%) sure uname gives the installed arch, not what the hardware is capable of (which I always rely on the lm flag for).
Chris
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2033 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20110506/aa892e3a/attachment.bin>
More information about the ubuntu-users
mailing list