<?xml version="1.0"?>
<!DOCTYPE document [
  <!ENTITY project SYSTEM "project.xml">
]>
<document url="reporttools.html">
 
  &project;
<copyright>
   Licensed to the Apache Software Foundation (ASF) under one or more
   contributor license agreements.  See the NOTICE file distributed with
   this work for additional information regarding copyright ownership.
   The ASF licenses this file to You under the Apache License, Version 2.0
   (the "License"); you may not use this file except in compliance with
   the License.  You may obtain a copy of the License at
 
       http://www.apache.org/licenses/LICENSE-2.0
 
   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
</copyright>
<properties>
<title>Reporting Tools</title>
<author>Glenn Nielsen</author>
</properties>
<body>
<section name="Reporting Tools">
<p>
The mod_jk source distribution contains two perl scripts in the
tools/reports directory which can be used to analyze the mod_jk
logs, save statistical data, and generate report graphs.
</p>

<p><code>tomcat_trend.pl log_dir archive_dir</code></p>
<p>
Script for analyzing mod_jk.log data when logging tomcat request data using
the <code>JkRequestLogFormat</code> Apache mod_jk configuration.
Generates statistics for request latency and errors.  Archives the generated
data to files for later use in long term trend graphs and reports.
</p>

<p><code>tomcat_reports.pl archive_dir reports_dir</code></p>
<p>
Script for generating reports and graphs using statistical data generated
by the <code>tomcat_trend.pl</code> script.

The following graphs are created:
<ul>
  <li>tomcat_request.png - Long term trend graph of total number of tomcat
    requests handled.</li>
  <li>tomcat_median.png - Long term overall trend graph of tomcat request
    latency median.</li>
  <li>tomcat_deviation.png - Long term overall trend graph of tomcat request
    mean and standard deviation.</li>
  <li>tomcat_error.png - Long term trend graph of requests rejected by tomcat.
    Shows requests rejected when tomcat has no request processors available.
    Can be an indicator that tomcat is overloaded or having other scaling
    problems.</li>
  <li>tomcat_client.png - Long term trend graph of requests forward to tomcat
    which were aborted by the remote client (browser).  You will normally see
    some aborted requests.  High numbers of these can be an indicator that
    tomcat is overloaded or there are requests which have very high latency.</li>
</ul>
</p>

<p>
A great deal of statistical data is generated but at this time
only long term trend graphs are being created and no reports.
This is only a start.  Many more graphs and reports could be
generated from the data. Please consider contributing back any
new reports or graphs you create.  Thanks.
</p>

<p>
These perl scripts depend upon the following perl modules and libraries:
<ul>
  <li>GD 1.8.x graphics library <a href="http://www.boutell.com/gd/">
    http://www.boutell.com/gd/</a></li>
  <li>GD 1.4.x perl module</li>
  <li>GD Graph perl module</li>
  <li>GD TextUtil perl module</li>
  <li>StatisticsDescriptive perl module</li>
</ul>
</p>
</section>

</body>
</document>
