Tuesday, July 5, 2011

Is application/package running in 32-bit or 64-bit in a 64-bit kernel?

In Solaris:

If the hardware is 64-bit capable, a new software install will, by default, install the 64-bit packages. To check to see if the 64-bit packages have been installed, use the pkginfo command.

/usr/bin > pkginfo | grep 64
application SUNWbdb                         BerkeleyDB-Base 4.2.52 (sun-private) Solaris Sparc 32-bit and 64-bit Architecture
application SUNWbdbj                        BerkeleyDB-Java(sun-private) 4.2.52 Solaris Sparc 32-bit and 64-bit Architecture
system      SUNWkfb                         Sun XVR-2500 Graphics System Software/Device Driver (64-bit)
system      SUNWnfb                         Sun XVR-300 Graphics System Software/Device Driver (64-bit)
application SUNWnfbcf                       Sun XVR-300 Graphics Configuration Software (64-bit)
application SUNWnfbw                        Sun XVR-300 Graphics Window System Support (64-bit)
system      SUNWrtvc                        SunVideo Device Driver (64-bit)
/usr/bin >
/usr/bin >

If no package names are returned, then only 32-bit packages are installed.

Use pkginfo -l to verify the package is installed:
/usr/bin > pkginfo -l SUNWkfb
   PKGINST:  SUNWkfb
      NAME:  Sun XVR-2500 Graphics System Software/Device Driver (64-bit)
  CATEGORY:  system,graphics
      ARCH:  sparc.sun4v
   VERSION:  10.0.0,REV=2007.05.24
   BASEDIR:  /
    VENDOR:  Sun Microsystems, Inc.
      DESC:  Device driver for the PCI-E Bus Sun XVR-2500 graphics accelerator (64-bit)
    PSTAMP:  zubat20081229020311
  INSTDATE:  Mar 05 2011 21:28
   HOTLINE:  Please contact your local service provider
    STATUS:  completely installed
     FILES:        6 installed pathnames
                   5 shared pathnames
                   5 directories
                   1 executables
                2800 blocks used (approx)


-----------------------------------------------------------
In Linux:

List all installed packages using rpm -qa option:
>rpm -qa | grep htmldoc
htmldoc-1.8.27.1-0

Display more information about package using rpm -qi <package> command:
>rpm -qi htmldoc
Name        : htmldoc                      Relocations: (not relocatable)
Version     : 1.8.27.1                          Vendor: Easy Software Products
Release     : 0                             Build Date: Tue Aug 29 21:01:51 2006
Install Date: Tue Mar  2 17:26:33 2010         Build Host: amd64.lab.easysw.com
Group       : Applications                  Source RPM: htmldoc-1.8.27.1-0.src.rpm
Size        : 8052423                          License: 1997-2006 by Easy Software Products, All Rights Reserved.
Signature   : (none)
Packager    : mike@amd64.lab.easysw.com
Summary     : HTMLDOC
Description :
HTMLDOC converts HTML files and web pages to PDF and PostScript.

Is Unix running in 32-bit or 64 bit?

In Solaris:

You can determine the currently running kernel with this command:

/usr/bin > /usr/bin/isainfo -kv
64-bit sparcv9 kernel modules
/usr/bin > isainfo -v
64-bit sparcv9 applications
        asi_blk_init vis2 vis popc
32-bit sparc applications
        asi_blk_init vis2 vis popc v8plus div32 mul32
This machine is able to run 64 bit applications, thus it has a 64 bit kernel running. If you only saw a 32-bit response or even "Command not found" then you are running with a 32 bit kernel.

-------------------------------------------------------
In Linux:
>uname -a
Linux linux-machine 2.6.18-194.8.1.el5 #1 SMP Wed Jun 23 10:52:51 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux

>uname -m
x86_64
If it prints i686 then your kernel is 32 bit, if you see x86_64 then it's 64 bit,