How to extract patch names and install dates from the .HIS patch history file.

Document ID : KB000050957
Last Modified Date : 14/02/2018
Show Technical Document Details

Description:

When a CA Technologies product patch is installed or uninstalled using ApplyPTF, a set of messages is written to a log file called the patch history file. The log file is named <server_name>.HIS where server_name is the name of the server. The set of messages written to the file may include detailed information, such as the names of the individual files that have been installed.

In some cases, such as troubleshooting, it may be helpful to extract a summary from the file that consists of only the patch names and their install or uninstall dates.

On a Microsoft Windows operating system, the "find" command can be used to extract the summary information.

If the .HIS file has been generated on a non-Windows system such as Unix, equivalent shell commands can be used to extract the summary, or you may want to transfer the file to a Windows system and then use the "find" command.

Solution:

To extract the summary information from the patch history file:

  1. Open a Command Prompt window.

  2. Set the current directory to that containing the <servername>.HIS file.

    TIP: Enter this command to do this in one step: nxcd

  3. Enter one of the following commands:
    find "PTF" *.HIS > <servername>_Patch_Summary.txt
    OR
    find /N "PTF" *.HIS > <servername>_Patch_Summary.txt
    where "<servername>_Patch_Summary.txt" is the name you have chosen for the output file. For example, MyServer_Patch_Summary.txt.

Note that the "find" command is not case sensitive and that issuing the command does not change the .HIS file.

Adding the switch "/N" to the find command causes the line number to precede each output line.

There should be only one .HIS file in the default directory. However, if you are issuing the find command in a directory in which multiple .HIS files have been gathered, specify the full name of the .HIS file in the "find" command. For example, if the name of the patch history file is MyServer.HIS, issue:

     find /N "PTF" MyServer.HIS > MyServer_Patch_Summary.txt

Examples

Here is sample output from the patch summary file.

MyServer_Patch_Summary.txt:

  ---------- MyServer.HIS
  [Wed Nov 18 11:57:02 2009] - PTF Wizard installed RO12848 (USRD)
  [Wed Nov 18 12:27:33 2009] - PTF Wizard installed RO12850 (USRD)
  [Wed Nov 18 12:41:32 2009] - PTF Wizard installed RO11972 (USRD)
  [Wed Nov 18 12:47:55 2009] - PTF Wizard backed out RO11972 (USRD)

Output text when the "/N" switch is used:

  ---------- MyServer.HIS
  [2][Wed Nov 18 11:57:02 2009] - PTF Wizard installed RO12848 (USRD)
  [257][Wed Nov 18 12:27:33 2009] - PTF Wizard installed RO12850 (USRD)
  [281][Wed Nov 18 12:41:32 2009] - PTF Wizard installed RO11972 (USRD)
  .
  .
  .
  [735][Wed Sep 22 15:23:37 2010] - PTF Wizard installed RO19613 (USRD)
  [1296][Thu Sep 23 12:53:16 2010] - PTF Wizard installed RO19614 (USRD)
  [2179][Wed Sep 29 09:38:16 2010] - PTF Wizard installed T5GS148 (USRD)

Reading the file

Using the second example above, the "[2]" is the line number in the .HIS file, the patch number is "RO12848", the product code is "USRD", and the installation date for the patch is "[Wed Nov 18 11:57:02 2009]".

Counting the patches

If only a count of the number of patches installed or removed is needed, the "/C" switch may be used.

  find /C "PTF" *.HIS

Sample output:

  ---------- MyServer.HIS: 37

Note that each install and uninstall line is included in the count.

If only installs or uninstalls are required, use the specific text in the find command. For example:

  find /C "PTF Wizard installed" *.HIS