Return to rrdtool.txt CVS log | Up to [ELWIX - Embedded LightWeight unIX -] / embedaddon / lighttpd / doc / outdated |
1.1 ! misho 1: ======= ! 2: rrdtool ! 3: ======= ! 4: ! 5: ------------------- ! 6: Module: mod_rrdtool ! 7: ------------------- ! 8: ! 9: :Author: Jan Kneschke ! 10: :Date: $Date: 2004/08/29 09:43:49 $ ! 11: :Revision: $Revision: 1.1 $ ! 12: ! 13: :abstract: ! 14: mod_rrdtool is used to monitor the traffic and load on the webserver ! 15: ! 16: .. meta:: ! 17: :keywords: lighttpd, skeleton ! 18: ! 19: .. contents:: Table of Contents ! 20: ! 21: Description ! 22: =========== ! 23: ! 24: RRD_ is a system to store and display time-series data (i.e. network ! 25: bandwidth, machine-room temperature, server load average). ! 26: ! 27: .. _RRD: http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/ ! 28: ! 29: Options ! 30: ======= ! 31: ! 32: rrdtool.binary ! 33: path to the rrdtool binary ! 34: ! 35: e.g.: :: ! 36: ! 37: rrdtool.binary = "/usr/bin/rrdtool" ! 38: ! 39: rrdtool.db-name ! 40: filename of the rrd-database. Make sure that <rrdtool.db-name> doesn't exist ! 41: before the first run, as lighttpd has to create the DB for you. ! 42: ! 43: e.g.: :: ! 44: ! 45: rrdtool.db-name = "/var/www/lighttpd.rrd" ! 46: ! 47: Generating Graphs ! 48: ================= ! 49: ! 50: :: ! 51: ! 52: #!/bin/sh ! 53: ! 54: RRDTOOL=/usr/bin/rrdtool ! 55: OUTDIR=/var/www/servers/www.example.org/pages/rrd/ ! 56: INFILE=/var/www/lighttpd.rrd ! 57: OUTPRE=lighttpd-traffic ! 58: ! 59: DISP="-v bytes --title TrafficWebserver \ ! 60: DEF:binraw=$INFILE:InOctets:AVERAGE \ ! 61: DEF:binmaxraw=$INFILE:InOctets:MAX \ ! 62: DEF:binminraw=$INFILE:InOctets:MIN \ ! 63: DEF:bout=$INFILE:OutOctets:AVERAGE \ ! 64: DEF:boutmax=$INFILE:OutOctets:MAX \ ! 65: DEF:boutmin=$INFILE:OutOctets:MIN \ ! 66: CDEF:bin=binraw,-1,* \ ! 67: CDEF:binmax=binmaxraw,-1,* \ ! 68: CDEF:binmin=binminraw,-1,* \ ! 69: CDEF:binminmax=binmaxraw,binminraw,- \ ! 70: CDEF:boutminmax=boutmax,boutmin,- \ ! 71: AREA:binmin#ffffff: \ ! 72: STACK:binmax#f00000: \ ! 73: LINE1:binmin#a0a0a0: \ ! 74: LINE1:binmax#a0a0a0: \ ! 75: LINE2:bin#a0a735:incoming \ ! 76: GPRINT:bin:MIN:%.2lf \ ! 77: GPRINT:bin:AVERAGE:%.2lf \ ! 78: GPRINT:bin:MAX:%.2lf \ ! 79: AREA:boutmin#ffffff: \ ! 80: STACK:boutminmax#00f000: \ ! 81: LINE1:boutmin#a0a0a0: \ ! 82: LINE1:boutmax#a0a0a0: \ ! 83: LINE2:bout#a0a735:outgoing \ ! 84: GPRINT:bout:MIN:%.2lf \ ! 85: GPRINT:bout:AVERAGE:%.2lf \ ! 86: GPRINT:bout:MAX:%.2lf \ ! 87: " ! 88: ! 89: ! 90: $RRDTOOL graph $OUTDIR/$OUTPRE-hour.png -a PNG --start -14400 $DISP ! 91: $RRDTOOL graph $OUTDIR/$OUTPRE-day.png -a PNG --start -86400 $DISP ! 92: $RRDTOOL graph $OUTDIR/$OUTPRE-month.png -a PNG --start -2592000 $DISP ! 93: ! 94: OUTPRE=lighttpd-requests ! 95: ! 96: DISP="-v req --title RequestsperSecond -u 1 \ ! 97: DEF:req=$INFILE:Requests:AVERAGE \ ! 98: DEF:reqmax=$INFILE:Requests:MAX \ ! 99: DEF:reqmin=$INFILE:Requests:MIN \ ! 100: CDEF:reqminmax=reqmax,reqmin,- \ ! 101: AREA:reqmin#ffffff: \ ! 102: STACK:reqminmax#0e0e0e: \ ! 103: LINE1:reqmin#a0a0a0: \ ! 104: LINE1:reqmax#a0a0a0: \ ! 105: LINE2:req#00a735:requests" ! 106: ! 107: ! 108: $RRDTOOL graph $OUTDIR/$OUTPRE-hour.png -a PNG --start -14400 $DISP ! 109: $RRDTOOL graph $OUTDIR/$OUTPRE-day.png -a PNG --start -86400 $DISP ! 110: $RRDTOOL graph $OUTDIR/$OUTPRE-month.png -a PNG --start -2592000 $DISP ! 111: