Analyzing the request.log file for traffic patterns

The following steps show how to analyze request.log by generating a traffic graph and then generating cross-references to the output of the request.log and rlog.jar tools.

Description description

Environment

Adobe Experience Manager

Issue/Symptoms

How to analyze the request.log file for traffic patterns?

Resolution resolution

  1. Install Perl  (Programming language developed for text manipulation) and Gnuplot  (portable command-line) on your desktop and for Windows OS, install Cygwin  (Unix-like environment and command-line interface).

    When installing Cygwin, be sure to include Perl and Gnuplot during the installation in the  Select Packages  step. On Mac OS(X), install Brew  (free and open-source software package management system).

    After installing Brew, open the Mac Terminal application and run Brew to install Gnuplot.

  2. Download the two following files to a new folder on the computer.

    graph-request-log.pl

    requestlog.pm

  3. Run the command for the path of request.log:

    Perl and graph-request-log.pl --title Request Log Graph --output output.png request.log | Gnuplot.

    The command produces a file named output.png similar to the following:

To understand the graph above, one must understand what median and percentile mean. As shown in the graph users don’t use the system until around 7 am. The traffic picks up around 9 am. The traffic then increases further at 11:30 AM, and a spike in the number of requests and slower response times (visible by the median response time and 98th percentile markings). View the Readme file for more information about this graphing tool’s documentation.

  1. Now that the graph has been used to find important time periods, cross-reference the selected times in the log files (such as request.log and error.log). One easy way to view large files is to use the less command on the shell (Cygwin on Windows or Terminal on Mac). For example, run this command less request.log  and search for /2016 11:3[ 0-9] :, and press Enter to select the timeframe to 11:30 AM in the file and then click on Search.
  2. A cross-reference on the graphs against the output of the rlog.jar application shipped with AEM under opt/helpers can also be done. Instructions can be found in AEM docs.
recommendation-more-help
3d58f420-19b5-47a0-a122-5c9dab55ec7f