Tuesday, January 22, 2013

Beginning HP-UX for Linux Junkies

I've got the (unfortunate) privilege of doing some tinkering using a HP-UX box. But, as any battle-hardened Linux user would tell you, HP-UX (along with AIX, Solaris and other Unixes) is a different animal. Things may look similar, but lots of commands for simple things are different in parameters and usage. Here's what I learnt during this short stint using HP-UX and hopefully this will be good start for beginners.

Before you proceed

Ensure that the IP address of the HP-UX box in /etc/host file is correct. A simple line like this ( is an invalid address) will cause a lot of headaches:

#commented as 'evidence'
#    TEST01

Find out machine architecture:

Run: machinfo

Sample output:

CPU info:
   Intel(R) Itanium 2 9100 series processor (1.59 GHz, 18 MB)
   2 cores, 4 logical processors per socket
   532 MT/s bus, CPU version A1
          Active processor count:
          2 sockets
          4 cores (2 per socket)
          4 logical processors (2 per socket)
          LCPU attribute is disabled

Memory: 16353 MB (15.97 GB)

Firmware info:

   Firmware revision:  04.31
   FP SWA driver revision: 1.18
   IPMI is supported on this system.
   BMC firmware revision: 5.38

Platform info:

   Model:                  "ia64 hp server BL870c"
   Machine ID number:      27f7c389-7d33-11ee-45bb-3c46ec670369
   Machine serial number:  SGH55555RB

OS info:

   Nodename:  TEST01
   Release:   HP-UX B.11.31
   Version:   U (unlimited-user license)
   Machine:   ia64
   ID Number: 0670548873
   vmunix _release_version:
@(#) $Revision: vmunix:    B.11.31_LR FLAVOR=perf

Installing Bash shell

Once you've identified your HP-UX hardware and OS version (mine's ia64 aka Itanium running OS v11.31 aka 11i v3), go to http://hpux.connect.org.uk and search for 'bash'. As of the time of this article, the direct link to the bash download page is http://hpux.connect.org.uk/hppd/hpux/Shells/bash-4.2.039/. The page also shows the run-time dependencies needed. You'll need to download & install the dependencies as well (you can use 'depothelper' to install an application along with its dependencies in one go).

1) Download http://hpux.connect.org.uk/ftp/hpux/Shells/bash-4.2.039/bash-4.2.039-ia64-11.31.depot.gz
2) Transfer file to HP-UX box e.g. /tmp/bash-4.2.039-ia64-11.31.depot.gz
3) Unzip: gunzip /tmp/bash-4.2.039-ia64-11.31.depot.gz
4) Install: swinstall -s /tmp/bash-4.2.039-ia64-11.31.depot bash

By default, all external program executables are installed to /usr/local/bin. So to run: /usr/local/bin/bash

If you see this prompt:


Then you have installed bash successfully.

Using X-Windows

HP-UX uses CDE (Common Desktop Environment), so you can use Xming or Cygwin/X and run the following command to bring up the X-Windows login screen:

Xming: Xming -query

Cygwin/X: xwin -query

There's nothing much to see compared to Linux distros.

Using built-in System Management Homepage web application

By default, HP-UX comes with a nifty web application hosted within its box. This web application is like webmin.

To run: hpsmh autostart

Just point your web browser to (replace with actual IP of the box).

Useful link: http://www.cyberciti.biz/tips/hp-ux-networking-related-tools-and-commands.html

No comments: