I thought the file command would tell me whether a file was 32 or 64
bit.
file java
java: executable (RISC System/6000) or object module not stripped
??
try
# java -version
# what /usr/bin/java ## or whatever the path is to the binary you want
to investigatge
or
# lslpp -w /usr/bin/java ## to find the lpp and get some sort of
description from the lpp package that it is a part of
HTH
Mark Taylor
As far as I remember, this means 32-bit executable,
you get something else for 64-bit executables... just try it
I get the same result for other executables.
file lcfd
lcfd: executable (RISC System/6000) or object module
file zcat
zcat: executable (RISC System/6000) or object module
The os is 64 bit.
lslpp -l bos.64bit
Fileset Level State Description
----------------------------------------------------------------------------
Path: /usr/lib/objrepos
bos.64bit 5.2.0.75 COMMITTED Base Operating System
64 bit
Runtime
Path: /etc/objrepos
bos.64bit 5.2.0.50 COMMITTED Base Operating System
64 bit
Runtime
I should get something like this.
# file $ORACLE_HOME/bin/oracle
If the executable is 32-bit, the result is
oracle: executable (RISC System/6000) or object module not =
stripped
for 64-bit ocde
oracle: 64-bit AIX executable or object module not stripped
Tried the file command on the unix directory and this shows 32 bit and
64 bit.
file /usr/lib/boot/unix*
/usr/lib/boot/unix: 64-bit XCOFF executable or object module not
stripped
/usr/lib/boot/unix_64: 64-bit XCOFF executable or object module not
stripped
/usr/lib/boot/unix_mp: executable (RISC System/6000) or object module
not stripped
/usr/lib/boot/unix_up: executable (RISC System/6000) or object module
not stripped
Anyway the other system commands indicate that the os is 64 bit. It
seems that the app software installed is 32 bit.
Thanks.
> [Stuff about finding out if an object module, specifically java, is 32 or 64 bit ]
As was stated earlier, the file command does output something
different for 64-bit modules.
While IBM (as part of WebSphere) can have a 64-bit Java environment,
there are *significant* performance implications and system resource
requirements. Unless your application *needs* the heap space that a
64-bit implementation provides, you are really better off without it.
See
http://www.ibm.com/developerworks/websphere/techjournal/0612_col_alcott/0612_col_alcott.html
and related documents.
The IBM Java runs multiple threads. If there's only one thread active,
it's scheduled by AIX on only one processor. If you have a 16-way
system, you will only see "all processors equally active" if you have
16 threads that are runnable.
-- David
That's it. When compiling with gcc use options '-maix32' or '-maix64'
to select output-type.
Of course some datatypes have different sizes, programmers should be
carefull.
type 32-bit 64-bit
-----------------------
short 16 16
int 32 32
long 32 64
long long 64 64
size_t 32 64
void * 32 64
ptrdiff_t 32 64