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.
Run this command against the path of your request.log:
perl graph-request-log.pl --title "Request Log Graph" --output output.png request.log | gnuplot
The command generates a file named output.png similar to this:
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.
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.
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.