=======
rrdtool
=======

-------------------
Module: mod_rrdtool
-------------------

:Author: Jan Kneschke
:Date: $Date: 2004/08/29 09:43:49 $
:Revision: $Revision: 1.1 $

:abstract:
  mod_rrdtool is used to monitor the traffic and load on the webserver
  
.. meta::
  :keywords: lighttpd, skeleton
  
.. contents:: Table of Contents

Description
===========

RRD_ is a system to store and display time-series data (i.e. network
bandwidth, machine-room temperature, server load average). 

.. _RRD: http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/

Options
=======

rrdtool.binary
  path to the rrdtool binary

  e.g.: ::
  
    rrdtool.binary = "/usr/bin/rrdtool"

rrdtool.db-name
  filename of the rrd-database. Make sure that <rrdtool.db-name> doesn't exists
  before the first run as lighttpd has to create the DB for you.

  e.g.: ::
  
    rrdtool.db-name = "/var/www/lighttpd.rrd"
  
Generating Graphs
=================

::

  #!/bin/sh
  
  RRDTOOL=/usr/bin/rrdtool
  OUTDIR=/var/www/servers/www.example.org/pages/rrd/
  INFILE=/var/www/lighttpd.rrd
  OUTPRE=lighttpd
  
  DISP="DEF:bin=$INFILE:InOctets:AVERAGE \
        DEF:binmin=$INFILE:InOctets:MIN \
	DEF:binmax=$INFILE:InOctets:MAX \
        LINE1:bin#0000FF:in \
        LINE1:binmin#2222FF: \
	STACK:binmax#2222FF: \
	-v bytes/s"
			  
  $RRDTOOL graph $OUTDIR/$OUTPRE-hour.png -a PNG --start -14400 $DISP
  $RRDTOOL graph $OUTDIR/$OUTPRE-day.png -a PNG --start -86400 $DISP
  $RRDTOOL graph $OUTDIR/$OUTPRE-month.png -a PNG --start -2592000 $DISP
