#!/bin/sh #------------------------------------------------------------------------------ # Creation: patrick # Last Update: $Id$ #------------------------------------------------------------------------------ rrdolsrimage(){ echo graph \ $graph_path/$item-$intervall.png -z -i -c BACK#eeeeee -s $intervall \ -t \"Neighbor: $item\" -v \"%\" \ DEF:lq=$db_path/$item-olsr.rrd:lq:AVERAGE \ DEF:lqmin=$db_path/$item-olsr.rrd:lq:MIN \ DEF:lqmax=$db_path/$item-olsr.rrd:lq:MAX \ DEF:nlq=$db_path/$item-olsr.rrd:nlq:AVERAGE \ DEF:nlqmin=$db_path/$item-olsr.rrd:nlq:MIN \ DEF:nlqmax=$db_path/$item-olsr.rrd:nlq:MAX \ DEF:lost=$db_path/$item-olsr.rrd:lost:AVERAGE \ DEF:lostmin=$db_path/$item-olsr.rrd:lost:MIN \ DEF:lostmax=$db_path/$item-olsr.rrd:lost:MAX \ LINE1:lost#ff0000:Lost \ 'GPRINT:lostmin:MIN:"min\: %3.0lf"' \ 'GPRINT:lost:AVERAGE:"mittel\: %3.0lf"' \ 'GPRINT:lostmax:MAX:"max\: %3.0lf\n"' \ LINE1:lq#00ff00:LQ \ 'GPRINT:lqmin:MIN:" min\: %3.0lf"' \ 'GPRINT:lq:AVERAGE:"mittel\: %3.0lf"' \ 'GPRINT:lqmax:MAX:"max\: %3.0lf\n"' \ LINE1:nlq#0000ff:NLQ \ 'GPRINT:nlqmin:MIN:" min\: %3.0lf"' \ 'GPRINT:nlq:AVERAGE:"mittel\: %3.0lf"' \ 'GPRINT:nlqmax:MAX:"max\: %3.0lf"' ln -s $graph_path/$item-$intervall.png /srv/www/admin/olsr/$item-$intervall.png 2>/dev/null } db_path=$1 graph_path=$2 mkdir -p $graph_path mkdir -p /srv/www/admin/olsr if [ "`basename $0`" = "rrdtool.cgi" ] then item=$3 intervall=$4 rrdolsrimage else shift shift options=$* for item in $options do for intervall in e-3h e-24h e-1w e-1m e-1y do rrdolsrimage done done|rrdtool - fi