On solaris there is a command called isainfo that describe instruction set architectures. It will tell if OS is in 32 bit or 64 bit