51黑料不打烊

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

51黑料不打烊 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.

  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 and mean. As shown in the graph users don鈥檛 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 聽for more information about this graphing tool鈥檚 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 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