This documentation supports the 18.08 version of Remedy Action Request System.

To view the latest version, select the version from the Product version menu.

Running arpreparelogs.exe

The arpreparelogs.exe utility merges and formats BMC Remedy AR System logs that AR System Log Analyzer (arwklga) can analyze. The utility corrects format issues in log files and collates multiple files into a single file.

Before you begin

Before running arpreparelogs.exe, ensure that you have performed the following tasks:

To prepare multiple logs for AR System Log Analyzer

  1. Open a command prompt window and navigate to the working directory that contains the log files.
  2. Run the command:

    arpreparelogs -o <outputLogFileName> *.log

    The screen displays the steps that arpreparelogsperforms and the results, as well as the following message:

    Merging log files and re-assembling lines fragmented by carriage returns...
    

The output log file name is created in the working directory. The size of the output file is the sum of the input file sizes.

Tip

For large logs, run arpreparelogs against the API logs first, identify the RPC ID of a sample slow transaction, and then use the grep command to search for lines from the log with that value of RPC ID. See the following procedure.

To prepare logs for a single transaction

After performing an analysis of the system, you can focus on a particular slow transaction as follows:

  1. Identify the RPC ID of the transaction.
  2. Run arpreparelogs by using the -rparameter to indicate the RPC ID.

    arpreparelogs -r 38837 -o one_transaction.log *.log
    

To prepare logs from a time range subset of the log

When a performance issue occurs during a known time range but logs have been running for a much longer period, you can extract a portion of the logs within a specified time range:

  1. Open a command prompt window.
  2. Navigate to the location of the log files.
  3. Run arpreparelogs using the -s and -e parameters to indicate the start and end times.
    For example:

    arpreparelogs -s "09/29/2011 13:50:00" -e "09/29/2011 14:10:00" -o output.log *.log

This command creates an output.log file that contains log entries from all log files in the directory recorded on September 29, 2011, between 1:50 P.M. and 2:10 P.M.

Example

An administrator captures API and SQL logs to a file named arapi_2077092b.log and a separate filter log named arfilter_2077092b.log. The administrator copies both log files to a directory accessible to arpreparelogs.exe. After confirming no other .log files are included in the directory, the administrator runs the command:

arpreparelogs \-o final.log \*.log

Following is the expected output:

C:\Program Files\BMCts>arpreparelogs -o final.log *.log
Log lines containing timestamps outside of the following range will not appear in output:
  Minimum timestamp: 01-JAN-2000 06:00:00.0
  Maximum timestamp: 01-JAN-2035 00:00:00.0 Replacing Ctrl-Z with space so that logs may be read as text
  arfilter_20770929b.log
  arapi_20770929b.log
Finding wrap point and unwrapping each log file
  arfilter_20770929b.log
    Searching for wrap point
..........................
    arfilter_20770929b.log does not appear to have wrapped or wrap point found a
t first or last line.
    Unwrap not necessary
  arapi_20770929b.log
    Searching for wrap point
.
    arapi_20770929b.log does not appear to have wrapped or wrap point found at f
irst or last line.
    Unwrap not necessary
Merging log files and re-assembling lines fragmented by carriage returns........
...................

C:\Program Files\BMCts>

Note

The arpreparelogs.exe utility accepts date in the mm/dd/yyyy hh:mm:ss.ssss format. But the utility reads the logs correctly only if the date is provided in the standard English format.

Workaround:

You need to search and replace the non-English day and month of the week with the English equivalent in the logs, prior to running the arpreparelogs.exe utility.

For example, if you see the /* ti mar 25 2014 15:07:46.9140 */SQL Trace Log -- ON (AR Server 8.1.00.002 201308272305Hotfix) string in the log file, replace the ti mar string to Tue Mar.

Troubleshooting

If an issue occurs while running arpreparelogs.exe, investigate as follows:

  1. Verify that the working directory contains sufficient space.
    The output file will take about the same amount of space as the combined log files.
  2. Verify that the generated output file is approximately the correct size.
  3. Verify that the log files are accessible to arpreparelogs.exe.
Was this page helpful? Yes No Submitting... Thank you

Comments