1833038 Members
2492 Online
110049 Solutions
New Discussion

32 bit or 64 bit

 
khilari
Regular Advisor

32 bit or 64 bit

how do u find out how many bits is ur OS and ur application.
Thanks
4 REPLIES 4
Gene Laoyan
Super Advisor

Re: 32 bit or 64 bit

What CPU type is your system and what OS is tunning on it?
James R. Ferguson
Acclaimed Contributor

Re: 32 bit or 64 bit

Hi:

# getconf KERNEL_BITS

...will tell you the "bitness" of your current kernel, e.g. "64"

# getconf HW_CPU_SUPP_BITS

...will tell you the "bitness" your hardware will support, e.g. "32/64"

# file filename

...will return:

"ELF-64 executable object file - PA-RISC 2.0 (LP64)" for a 64bit codefile, otherwise something like:

"PA-RISC1.1 shared executable" for a 32bit one.

Regards!

...JRF...
Patrick Wallek
Honored Contributor

Re: 32 bit or 64 bit

If you are running HP-UX 10.20, then you are 32-bit ONLY.

If you are running any HP-UX 11.X version, run:

# getconf KERNEL_BITS


This will return 32 or 64, which is the "bitness" or your OS.

For your application, it depends. If there is a single executable you can run the 'file' command on it. If it returns something like "ELF-64" then it is 64-bit. Anything else generally indicates 32-bit.

Don Morris_1
Honored Contributor

Re: 32 bit or 64 bit

OS:

getconf KERNEL_BITS

64 --> 64 bits
32 --> 32 bits

For the application... well, you should know if it is your application. But I'd run chatr on the binary -- first line should tell you if it is 32 or 64 bits. Example:

# chatr /tmp/pig2b
/tmp/pig2b:
64-bit ELF executable