Some Computer Hints

HP-UX Patch Management

To check whether swinstall installed and configured all packages successfully run the command

# swlist -l fileset -a state | grep -v configured | grep -v '^#'

If no output is produced, then everything is OK.

You can use show_patches to display a patch list. For example, the command

# show_patches -s

shows which patches have been superseded.

To save disk space on the volume where /var/adm/sw resides, you can commit all installed patches. First run the following commands and record their outputs:

# swlist -l patch \*.\*,c=patch | grep "superseded *$" | wc -l
# swlist -l patch \*.\*,c=patch | grep "committed *$" | wc -l
# swlist -l patch \*.\*,c=patch | grep "applied *$" | wc -l

then use either one of the following commands

# swmodify -x patch_commit=true "PH??_?????.*"
# swmodify -x patch_commit=true \*

to commit all patches. Finally run the above swlist commands once more and compare the results.

You can use also the

# cleanup -c 1

command to commit all superseded patches.

If you want to add a reboot script and customize the reboot process of the swinstall command (for the cases it automatically reboots the system after patch installation), add the line

swagent.reboot_cmd = your_reboot_script

to the end of the file /var/adm/sw/defaults. The following are additional recommended options to be added to this file:

swinstall.retry_rpc = 9
swinstall.rpc_timeout = 5
swinstall.agent_timeout_minutes = 100
swinstall.polling_interval = 60