#!/bin/sh RRD_BIN=/usr/bin RRDPAGE=/var/www/time.mattrude.com/rrd GRAPHS=/var/www/time.mattrude.com/graphs SCRIPTS=/var/www/time.mattrude.com/scripts if [ ! -e $GRAPHS ]; then mkdir -p $GRAPHS fi cd ${RRDPAGE} ${RRD_BIN}/rrdtool graph \ --imgformat=PNG ${GRAPHS}/kirby-clients.png \ --start=-86400 --end=-300 \ --title='Kirby - 174.143.169.159' \ --rigid \ --height=100 \ --width=290 \ --alt-autoscale-max \ --lower-limit=0 \ --vertical-label='Active Clients' \ --slope-mode \ --font TITLE:12: \ --font AXIS:8: \ --font LEGEND:8: \ --font UNIT:8: \ DEF:a="/var/www/time.mattrude.com/rrd/kirby.mattrude.com-clients.rrd":clients:AVERAGE \ AREA:a#002A97FF:"" \ GPRINT:a:LAST:"Now\:%8.2lf %s" \ GPRINT:a:AVERAGE:"Avg\:%8.2lf %s" \ GPRINT:a:MAX:"Max\:%8.2lf %s\n" \ ${RRD_BIN}/rrdtool graph \ --imgformat=PNG ${GRAPHS}/twyla-clients.png \ --start=-86400 --end=-300 \ --title='Twyla - 174.143.174.61' \ --rigid \ --height=100 \ --width=290 \ --alt-autoscale-max \ --lower-limit=0 \ --vertical-label='Active Clients' \ --slope-mode \ --font TITLE:12: \ --font AXIS:8: \ --font LEGEND:8: \ --font UNIT:8: \ DEF:a="/var/www/time.mattrude.com/rrd/twyla.mattrude.com-clients.rrd":clients:AVERAGE \ AREA:a#002A97FF:"" \ GPRINT:a:LAST:"Now\:%8.2lf %s" \ GPRINT:a:AVERAGE:"Avg\:%8.2lf %s" \ GPRINT:a:MAX:"Max\:%8.2lf %s\n" \ ${RRD_BIN}/rrdtool graph \ --imgformat=PNG ${GRAPHS}/samantha-clients.png \ --start=-86400 --end=-300 \ --title='Samantha - 174.143.173.49' \ --rigid \ --height=100 \ --width=290 \ --alt-autoscale-max \ --lower-limit=0 \ --vertical-label='Active Clients' \ --slope-mode \ --font TITLE:12: \ --font AXIS:8: \ --font LEGEND:8: \ --font UNIT:8: \ DEF:a="/var/www/time.mattrude.com/rrd/samantha.mattrude.com-clients.rrd":clients:AVERAGE \ AREA:a#002A97FF:"" \ GPRINT:a:LAST:"Now\:%8.2lf %s" \ GPRINT:a:AVERAGE:"Avg\:%8.2lf %s" \ GPRINT:a:MAX:"Max\:%8.2lf %s\n" \ ${RRD_BIN}/rrdtool graph \ --imgformat=PNG ${GRAPHS}/all-clients.png \ --start=-86400 --end=-300 \ --title='Active Clients on All Servers' \ --rigid \ --height=72 \ --width=290 \ --alt-autoscale-max \ --lower-limit=0 \ --vertical-label='Active Clients' \ --slope-mode \ --font TITLE:12: \ --font AXIS:8: \ --font LEGEND:8: \ --font UNIT:8: \ DEF:a="/var/www/time.mattrude.com/rrd/kirby.mattrude.com-clients.rrd":clients:AVERAGE \ DEF:b="/var/www/time.mattrude.com/rrd/twyla.mattrude.com-clients.rrd":clients:AVERAGE \ DEF:c="/var/www/time.mattrude.com/rrd/samantha.mattrude.com-clients.rrd":clients:AVERAGE \ LINE1:a#002A97FF:"Kirby:" \ GPRINT:a:LAST:"Now\:%6.2lf %s" \ GPRINT:a:AVERAGE:"Avg\:%6.2lf %s" \ GPRINT:a:MAX:"Max\:%6.2lf %s\n" \ LINE1:b#000000FF:"Twyla:" \ GPRINT:b:LAST:"Now\:%6.2lf %s" \ GPRINT:b:AVERAGE:"Avg\:%6.2lf %s" \ GPRINT:b:MAX:"Max\:%6.2lf %s\n" \ LINE1:c#990000FF:"Saman:" \ GPRINT:c:LAST:"Now\:%6.2lf %s" \ GPRINT:c:AVERAGE:"Avg\:%6.2lf %s" \ GPRINT:c:MAX:"Max\:%6.2lf %s\n" \ /usr/bin/optipng ${GRAPHS}/kirby-clients.png /usr/bin/optipng ${GRAPHS}/twyla-clients.png /usr/bin/optipng ${GRAPHS}/samantha-clients.png /usr/bin/optipng ${GRAPHS}/all-clients.png #end