* FW: 64 bit or 32 bit
@ 2007-08-17 18:18 Kirkwood, David A.
2007-08-17 21:42 ` terry white
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: Kirkwood, David A. @ 2007-08-17 18:18 UTC (permalink / raw)
To: linux-admin
From: Kirkwood, David A.
Sent: Friday, August 17, 2007 1:13 PM
To: Linux group (linux-admin@vger.kernel.org)
Subject: 64 bit or 32 bit
How can I tell if a given system is running a 32bit krnel or a 64bit kernel. I a system capable of running either, but I cannot figure out which kernel is installed on it.
David A. Kirkwood
-
To unsubscribe from this list: send the line "unsubscribe linux-admin" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: FW: 64 bit or 32 bit
2007-08-17 18:18 FW: 64 bit or 32 bit Kirkwood, David A.
@ 2007-08-17 21:42 ` terry white
2007-08-19 19:48 ` Benoit Rouits
2007-08-20 18:34 ` Glynn Clements
2 siblings, 0 replies; 9+ messages in thread
From: terry white @ 2007-08-17 21:42 UTC (permalink / raw)
To: Kirkwood, David A.; +Cc: linux-admin
... ciao:
: on "8-17-2007" "Kirkwood, David A." writ:
: How can I tell if a system running a 32bit or 64bit kernel.
my first inclination is 'uname -a', which might offer a hint by virtue
of the cpu. in addition, you might take a look at "./.config" at the
root of the kernel source ...
--
... i'm a man, but i can change,
if i have to , i guess ...
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: FW: 64 bit or 32 bit
2007-08-17 18:18 FW: 64 bit or 32 bit Kirkwood, David A.
2007-08-17 21:42 ` terry white
@ 2007-08-19 19:48 ` Benoit Rouits
2007-08-20 18:36 ` Glynn Clements
2007-08-20 18:34 ` Glynn Clements
2 siblings, 1 reply; 9+ messages in thread
From: Benoit Rouits @ 2007-08-19 19:48 UTC (permalink / raw)
To: Kirkwood, David A.; +Cc: linux-admin
just make a C program like this:
int main()
{
printf("address bus is %d bytes\n",sizeof(void*));
}
and compile it with cc then run it.
If it prints 8, it is a 64 bit OS, if it prints 4, it is a 32 bit OS.
cheers
- Ben
Le vendredi 17 août 2007 à 14:18 -0400, Kirkwood, David A. a écrit :
>
> From: Kirkwood, David A.
> Sent: Friday, August 17, 2007 1:13 PM
> To: Linux group (linux-admin@vger.kernel.org)
> Subject: 64 bit or 32 bit
>
> How can I tell if a given system is running a 32bit krnel or a 64bit kernel. I a system capable of running either, but I cannot figure out which kernel is installed on it.
>
> David A. Kirkwood
>
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-admin" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
-
To unsubscribe from this list: send the line "unsubscribe linux-admin" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: FW: 64 bit or 32 bit
2007-08-17 18:18 FW: 64 bit or 32 bit Kirkwood, David A.
2007-08-17 21:42 ` terry white
2007-08-19 19:48 ` Benoit Rouits
@ 2007-08-20 18:34 ` Glynn Clements
2007-08-21 6:02 ` Carsten Aulbert
2 siblings, 1 reply; 9+ messages in thread
From: Glynn Clements @ 2007-08-20 18:34 UTC (permalink / raw)
To: Kirkwood, David A.; +Cc: linux-admin
Kirkwood, David A. wrote:
> How can I tell if a given system is running a 32bit krnel or a 64bit
> kernel. I a system capable of running either, but I cannot figure out
> which kernel is installed on it.
gzip -dc /proc/config.gz | fgrep CONFIG_X86_64
There may be similar information elsewhere in /proc; I don't know what
/proc/cpuinfo says for 64-bit architectures.
--
Glynn Clements <glynn@gclements.plus.com>
-
To unsubscribe from this list: send the line "unsubscribe linux-admin" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: FW: 64 bit or 32 bit
2007-08-19 19:48 ` Benoit Rouits
@ 2007-08-20 18:36 ` Glynn Clements
2007-08-20 23:30 ` Benoit Rouits
0 siblings, 1 reply; 9+ messages in thread
From: Glynn Clements @ 2007-08-20 18:36 UTC (permalink / raw)
To: Benoit Rouits; +Cc: Kirkwood, David A., linux-admin
Benoit Rouits wrote:
> > How can I tell if a given system is running a 32bit krnel or a 64bit
> > kernel. I a system capable of running either, but I cannot figure
> > out which kernel is installed on it.
>
> just make a C program like this:
>
> int main()
> {
> printf("address bus is %d bytes\n",sizeof(void*));
> }
> and compile it with cc then run it.
> If it prints 8, it is a 64 bit OS, if it prints 4, it is a 32 bit OS.
That tells you which architecture the program was compiled for, not
which architecture the kernel was compiled for. x86_64 can run both
32- and 64-bit code.
--
Glynn Clements <glynn@gclements.plus.com>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: FW: 64 bit or 32 bit
2007-08-20 18:36 ` Glynn Clements
@ 2007-08-20 23:30 ` Benoit Rouits
2007-08-21 8:13 ` Glynn Clements
0 siblings, 1 reply; 9+ messages in thread
From: Benoit Rouits @ 2007-08-20 23:30 UTC (permalink / raw)
To: Glynn Clements; +Cc: Kirkwood, David A., linux-admin
Le lundi 20 août 2007 à 19:36 +0100, Glynn Clements a écrit :
> Benoit Rouits wrote:
>
> > > How can I tell if a given system is running a 32bit krnel or a 64bit
> > > kernel. I a system capable of running either, but I cannot figure
> > > out which kernel is installed on it.
> >
> > just make a C program like this:
> >
> > int main()
> > {
> > printf("address bus is %d bytes\n",sizeof(void*));
> > }
> > and compile it with cc then run it.
> > If it prints 8, it is a 64 bit OS, if it prints 4, it is a 32 bit OS.
>
> That tells you which architecture the program was compiled for, not
> which architecture the kernel was compiled for. x86_64 can run both
> 32- and 64-bit code.
>
well, if we have a 64-bit kernel /and/ a compiler for 64 bits
architectures, i think that a long int must be 8 bytes, no ?
-
To unsubscribe from this list: send the line "unsubscribe linux-admin" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: FW: 64 bit or 32 bit
2007-08-20 18:34 ` Glynn Clements
@ 2007-08-21 6:02 ` Carsten Aulbert
2007-08-21 8:27 ` Glynn Clements
0 siblings, 1 reply; 9+ messages in thread
From: Carsten Aulbert @ 2007-08-21 6:02 UTC (permalink / raw)
To: Glynn Clements; +Cc: Kirkwood, David A., linux-admin
Hi
Glynn Clements wrote:
> There may be similar information elsewhere in /proc; I don't know what
> /proc/cpuinfo says for 64-bit architectures.
>
Not much I fear:
This is a 32bit Centrino:
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 13
model name : Intel(R) Pentium(R) M processor 2.26GHz
stepping : 8
cpu MHz : 798.000
cache size : 2048 KB
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 2
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge
mca cmov pat clflush dts acpi mmx fxsr sse sse2 ss tm pbe nx up est tm2
bogomips : 1598.13
clflush size : 64
This a 64bit Athlon:
processor : 1
vendor_id : AuthenticAMD
cpu family : 15
model : 75
model name : AMD Athlon(tm) 64 X2 Dual Core Processor 4600+
stepping : 2
cpu MHz : 2411.413
cache size : 512 KB
physical id : 0
siblings : 2
core id : 1
cpu cores : 2
fpu : yes
fpu_exception : yes
cpuid level : 1
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge
mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext
fxsr_opt rdtscp lm 3dnowext 3dnow pni cx16 lahf_lm cmp_legacy svm cr8_legacy
bogomips : 4828.44
TLB size : 1024 4K pages
clflush size : 64
cache_alignment : 64
address sizes : 40 bits physical, 48 bits virtual
power management: ts fid vid ttp tm stc
This a 64bit Opteron:
processor : 3
vendor_id : AuthenticAMD
cpu family : 15
model : 65
model name : Dual-Core AMD Opteron(tm) Processor 2218
stepping : 3
cpu MHz : 2613.435
cache size : 1024 KB
physical id : 1
siblings : 2
core id : 1
cpu cores : 2
fpu : yes
fpu_exception : yes
cpuid level : 1
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge
mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext
fxsr_opt rdtscp lm 3dnowext 3dnow pni cx16 lahf_lm cmp_legacy svm cr8_legacy
bogomips : 5227.17
TLB size : 1024 4K pages
clflush size : 64
cache_alignment : 64
address sizes : 40 bits physical, 48 bits virtual
power management: ts fid vid ttp tm stc
If someone is interested I can give same results for 64bit Xeon system,
but that's powered off right now.
However, I just ran lshw and that gives me:
product: Dual-Core AMD Opteron(tm) Processor 2218
vendor: Advanced Micro Devices [AMD]
physical id: 4
bus info: cpu@0
version: Dual-Core AMD Opteron(tm) Processor 2218
serial: To Be Filled By O.E.M.
slot: CPU 1
size: 2600MHz
capacity: 2600MHz
width: 64 bits
clock: 200MHz
capabilities: fpu fpu_exception wp vme de pse tsc msr pae mce
cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht
syscall nx mmxext fxsr
_opt rdtscp x86-64 3dnowext 3dnow pni cx16 lahf_lm cmp_legacy svm cr8_legacy
Please have a look at capabilities, where x86-64 is mentioned. Thus
right now I would suggest using lshw|grep x86-64.
Sorry, that I don't know where it pulls this particular info from.
Carsten
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: FW: 64 bit or 32 bit
2007-08-20 23:30 ` Benoit Rouits
@ 2007-08-21 8:13 ` Glynn Clements
0 siblings, 0 replies; 9+ messages in thread
From: Glynn Clements @ 2007-08-21 8:13 UTC (permalink / raw)
To: Benoit Rouits; +Cc: Kirkwood, David A., linux-admin
Benoit Rouits wrote:
> > > > How can I tell if a given system is running a 32bit krnel or a 64bit
> > > > kernel. I a system capable of running either, but I cannot figure
> > > > out which kernel is installed on it.
> > >
> > > just make a C program like this:
> > >
> > > int main()
> > > {
> > > printf("address bus is %d bytes\n",sizeof(void*));
> > > }
> > > and compile it with cc then run it.
> > > If it prints 8, it is a 64 bit OS, if it prints 4, it is a 32 bit OS.
> >
> > That tells you which architecture the program was compiled for, not
> > which architecture the kernel was compiled for. x86_64 can run both
> > 32- and 64-bit code.
>
> well, if we have a 64-bit kernel /and/ a compiler for 64 bits
> architectures, i think that a long int must be 8 bytes, no ?
If you compile the code into a 64-bit executable, it will either print
"address bus is 8 bytes" or refuse to run.
If you compile the code into a 32-bit executable, it will print
"address bus is 4 bytes" regardless of whether you run it on a 32- or
64-bit system.
--
Glynn Clements <glynn@gclements.plus.com>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: FW: 64 bit or 32 bit
2007-08-21 6:02 ` Carsten Aulbert
@ 2007-08-21 8:27 ` Glynn Clements
0 siblings, 0 replies; 9+ messages in thread
From: Glynn Clements @ 2007-08-21 8:27 UTC (permalink / raw)
To: Carsten Aulbert; +Cc: Kirkwood, David A., linux-admin
Carsten Aulbert wrote:
> > There may be similar information elsewhere in /proc; I don't know what
> > /proc/cpuinfo says for 64-bit architectures.
>
> Not much I fear:
>
> This is a 32bit Centrino:
> flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge
> mca cmov pat clflush dts acpi mmx fxsr sse sse2 ss tm pbe nx up est tm2
> This a 64bit Athlon:
> flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge
> mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext
> fxsr_opt rdtscp lm 3dnowext 3dnow pni cx16 lahf_lm cmp_legacy svm cr8_legacy
> This a 64bit Opteron:
> flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge
> mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext
> fxsr_opt rdtscp lm 3dnowext 3dnow pni cx16 lahf_lm cmp_legacy svm cr8_legacy
I think that "lm" might be relevant; this corresponds to the following
flag in <asm/cpufeature.h>:
#define X86_FEATURE_LM (1*32+29) /* Long Mode (x86-64) */
It's considered an AMD flag, so I don't know if it will be present on
an ia64 system.
--
Glynn Clements <glynn@gclements.plus.com>
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2007-08-21 8:27 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-17 18:18 FW: 64 bit or 32 bit Kirkwood, David A.
2007-08-17 21:42 ` terry white
2007-08-19 19:48 ` Benoit Rouits
2007-08-20 18:36 ` Glynn Clements
2007-08-20 23:30 ` Benoit Rouits
2007-08-21 8:13 ` Glynn Clements
2007-08-20 18:34 ` Glynn Clements
2007-08-21 6:02 ` Carsten Aulbert
2007-08-21 8:27 ` Glynn Clements
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).