Analyze the request.log file for traffic patterns

The steps below teach you how to analyze the request.log.  You start by generating traffic graphs, then cross referencing them to the request.log and rlog.jar tool output.


  1. Install perl and gnuplot on your computer

    • On Windows OS, install Cygwin.  While installing Cygwin, make sure to include perl and gnuplot during the installation on the "Select Packages" step.
    • On Mac OS(X), install brew.  After installing Brew, then open the Mac Terminal application and run brew install gnuplot to install gnuplot.
  2. Download these two files to a new folder on your computer:  

  3. Run this command against the path of your request.log:

    perl --title "Request Log Graph" --output output.png request.log | gnuplot

    The command generates a file named output.png similar to this:

    To understand the graph above you must understand the meaning of median and percentile.

    You can see in the graph above that users are not really using the system until around 7AM.  Traffic increases around 9AM.  Then the traffic increases more at 11:30AM and we see a spike in the number of requests and slowdown in response times (which can be seen in the median and 98th percentile response time markings).

    For more detailed documentation on this graphing tool, see the Readme file.

  4. Using the graph, we found which times of day were significant, we could then cross reference those times in the log files (such as request.log and error.log).  

    One easy way to view large files is using the "less" command on the shell (via Cygwin or Linux Subsystem on Windows or Terminal on Mac). For example, run this command "less request.log", search by typing "/2016 11:3[0-9]:" then press enter to search for 11:30AM timeframe in the file.

  5. You can also cross reference the graph to the output of the rlog.jar application that ships with AEM under opt/helpers.  Instructions can be found in the AEM docs.


Получайте помощь быстрее и проще

Новый пользователь?