Comparing log files

The IBM® Monitoring and Diagnostic Tools - Garbage Collection and Memory Visualizer can plot data from multiple log files on the same chart. You can use this function to compare the behavior of applications that have different system settings or command-line options. You can also correlate different kinds of output from the same application.

About this task

Note: Comparing data of different types, for example verbose garbage collection and trace garbage collection, can produce inconsistent results.

Procedure

  1. Open the hosting tool.
  2. Open the first log file that you want to compare.
  3. In the menu bar, click File > Compare File..., then browse for the second log file that you want to compare and click Open.
    You can select multiple files from the same directory.
    Each file is shown in a tab within the Data set tab.

Results

The Line plot display shows data from both log files, plotted with different line styles. Each set of data is known as a variant. The Key window has a Variants section which shows the variants being compared, and their line styles. The variant name is based on the log file name. Hover over the variant name in the Key window to display the full file path. Use this function to distinguish between log files that have the same name, but a different location. The full path is also displayed if you hover over the file name in the tabs within the Data set tab.

What to do next

To remove a log file from the comparison click the Remove variant from comparison icon in the Variants section of the Key window.

Sometimes comparing files by plotting them on the same graph is not practical. For example, if you compare three files and plot five different items of data, the resulting graph displays 15 lines, which might be too many to be easily viewed. You might prefer to open the files individually, then drag the data set tabs to arrange the windows so that you can see the different files at the same time.