How to check 64/32 bit o/s?

I am bit confused by my o/s whether it is 32/64 bit o/s.

I could do isainfo -v - but this gives the capability of my system but not what is installed.

As a work around to this i did

$ file /sbin/init- says ELF 32 bit executable

Can i take this as my o/s is configured for 32 bit.

Is there any other command which can show the bit system?

[382 byte] By [dbasan] at [2007-11-25 22:59:05]
# 1

>> file /sbin/init - says ELF 32 bit executable

Hello.

Running Solaris 64 bit (I know this from Sparc machines) 32 bit programs will work without problems. Sun does not ship most programs in two versions but only as 32 bit version. Therefore /sbin/init is a 32 bit executable.

32 bit device drivers do not work in 64 bit mode.

To check if your OS runs in 64 bit mode you should simply try to execute an ELF 64 bit executable. If your OS is 32 bit you'll get an error message.

Martin

MartinDJ at 2007-7-5 17:14:24 > top of Java-index,Solaris Operating System,Solaris Essentials - General Technical Questions...
# 2

Try isainfo -k

man isainfo shows:

-kPrints the name of the instruction set(s) used by the operating system kernel components such as device drivers and STREAMS modules.

% isainfo -v

64-bit amd64 applications

cx16 sse3 sse2 sse fxsr amd_3dnowx amd_3dnow amd_mmx mmx cmov amd_sysc cx8 tsc fpu

32-bit i386 applications

cx16 sse3 sse2 sse fxsr amd_3dnowx amd_3dnow amd_mmx mmx cmov amd_sysc cx8 tsc fpu

% isainfo -k

amd64

% isainfo -kv

64-bit amd64 kernel modules

alta at 2007-7-5 17:14:24 > top of Java-index,Solaris Operating System,Solaris Essentials - General Technical Questions...
# 3
Thanks all for your wonderfull explanation.
dbasan at 2007-7-5 17:14:24 > top of Java-index,Solaris Operating System,Solaris Essentials - General Technical Questions...