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
arpreparelogs.exe, ensure that you have performed the following tasks:
- Capture the issue in appropriate logs.
- Download and install the utility.
- Review AR System Log Analyzer User Guide.
- Copy the log files to a working directory accessible to AR System Log Analyzer, and verify that no other files include a .log extension.
To prepare multiple logs for AR System Log Analyzer
- Open a command prompt window and navigate to the working directory that contains the log files.
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.
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:
- Identify the RPC ID of the transaction.
arpreparelogsby 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:
- Open a command prompt window.
- Navigate to the location of the log files.
-eparameters to indicate the start and end times.
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.
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:
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.
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.
If an issue occurs while running
arpreparelogs.exe, investigate as follows:
- Verify that the working directory contains sufficient space.
The output file will take about the same amount of space as the combined log files.
- Verify that the generated output file is approximately the correct size.
- Verify that the log files are accessible to