Using smpatch

After using the Sun update connection software and having lock-ups on several occasions, I have found it much easier and more reliable to use smpatch. Depending on your comfort with patching a system there are several options to make this process very manual or extremely automated.

smpatch updates are split up by four main commands (add, update, download and anlayze) which allow you to either perform an update in one step or break down an update into multiple steps.

smpatch add

  • Only applies the patch, all other functions require analyze and download.
  • Does not consult patch policy before applying a patch
    • To view an individuals patch policy examine the PATCH_PROPERTIES value in the PATCH/patchinfo file (ex. 115758-02/patchinfo)
  • Does not require multi-user mode

smpatch update

  • Performs an update in one step (analyze, download, and add)
  • Checks for any patch dependencies.
  • Checks patch policy to find out if the patch requires an immediate reboot, reconfiguration reboot, etc.
  • Can only be run in multi-user mode.
  • Will not apply an update that requires an interactive property.

smpatch download

  • Downloads patches for later installation

smpatch analyze

  • Analyzes system and generates a list of patches required by the system
  • Can be used to generate lists and script updates.

Manual method

I tend to use this method at times if I want to take my time and ensure each patch is installed successfully. Since I am patching productions systems I usually find it better to waste more of my time rather than finding a problem later on down the line. Still this is just more about personal comfort.

Download the patches

# smpatch download -i <PATCH ID> -i <PATCH ID>

Install the patch

# smpatch add -i <PATCH ID> -i <PATCH ID>

Or download AND install the patches in one step

# smpatch update -i <PATCH ID> -i <PATCH ID>

Using an idlist file

Analyze the system and create an idlist file

# smpatch analyze > patch.list

Once you have created the list you can edit your patches, taking anything out you no longer want and then perform your updates.

# vi patch.list

# smpatch download -x idlist=patch.list
# init S

# smpatch add -x idlist=patch.list

To perform your updates you can also use smpatch update. Note this can only be done in multi-user mode.

# vi patch.list

# smpatch update -x idlist=patch.list

1 comment

  1. Pingback:Smpatch useage | Bandbart

Leave a Reply

Your email address will not be published. Required fields are marked *