Is that HP-UX Kernel 32bit or 64bit?

4 January 2009

In today’s world of HP-UX on Itanium, this may seem archaic, since Itanium is 64bit all the way. However, you might find yourself on a PARISC machine anyway. Since PARISC processors come in 32bit and 64bit varieties, it can be important to verify which of these the current kernel is (32bit or 64bit).

It is also important to recognize the various ways of checking for 32-bit versus 64-bit kernels, and to know the limitations of each.

One way is to use the command getconf to get the number of bits used by the currently running kernel:

$ getconf KERNEL_BITS
64

You can also get the number of bits supported by the hardware, as well as find out if the hardware supports a 32-bit as well as 64-bit mode:

$ getconf HW_CPU_SUPP_BITS
64
$ getconf HW_32_64_CAPABLE
1

Another way to find this information is to use the print_manifest command, though you need to be root to run this command:

# print_manifest | grep -i "os mode"
    OS mode:            64 bit

However, since the print_manifest command documents the entire system, it takes a lot longer than the getconf command does.

Another way, albeit much less reliable, is to use the command file on the standard kernel.

Here’s an example from a PARISC system (an rp7420 running 11i v3):

# file /stand/vmunix
/stand/vmunix:  ELF-64 executable object file - PA-RISC 2.0 (LP64)

Here’s an example from an Itanium system (an rx6600 running 11i v2):

# file /stand/vmunix
/stand/vmunix:  ELF-64 executable object file - IA64

This command is only useful if you are using the standard kernel; if the system booted with another kernel instead, this will not give you a valid answer.

You could, however, use the file command on whatever kernel you are using to get the right answer. However, since getconf is so easy and fast, why bother?

Entry Filed under: HP-UX, Tips. Tags: , , , , , .

1 Comment Add your own

  • 1. Court  |  18 February 2009 at 9:04 am

    Anything after 11.00 is 64 bit. 11.00 was the last version to come in two flavors.

    Reply

Leave a Comment

Required

Required, hidden

Some HTML allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <pre> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Trackback this post  |  Subscribe to the comments via RSS Feed


David Douthitt

David is an experienced UNIX and Linux system administrator, a former Linux distribution maintainer, and author of two books ("Advanced Topics in System Administration" and "GNU Screen: A Comprehensive Manual"). View David Douthitt's profile on LinkedIn Support freedom The Internet Traffic Report monitors the flow of data around the world. It then displays a value between zero and 100. Higher values indicate faster and more reliable connections.

Recent Posts

Top Posts

RSS Sharky’s Column!

Calendar

January 2009
M T W T F S S
« Dec   Feb »
 1234
567891011
12131415161718
19202122232425
262728293031  

Recent Comments

Peter on Using Open Source in the Enter…
Anthony on About
MikeT on Stress Relief: Laugh Out Loud…
yungchin on Sparse files – what, why…
Randal L. Schwartz on Perl Tidbits: Annoyances and…

Category Cloud

BSD Career Conferences Debian Debugging Disaster recovery Fedora FreeBSD HP-UX Legal Linux MacOS X Mobile Computing Networking OpenBSD OpenSolaris OpenVMS Personal Notes Portable Code Presentations Productivity Programming Red Hat Scripting Security Solaris Storage Tips Ubuntu UNIX

Archives

Feeds

Blogroll

Pages

Meta