#!/usr/bin/env sh . ../../settings FIRSTFILE=`ls rrd/|head -n 1` if [ `$BINPATH/rrdtool info rrd/$FIRSTFILE|grep -c msrefused` -eq 0 ]; then echo "old-style databases found, update necessary."; # update databases if needed # FILES=`ls rrd` for nn in $FILES; do echo "updating $nn" $BINPATH/rrdtool dump rrd/$nn | ../../tools/rrdtool_add_ds.pl 1 nan GAUGE > rrd/temp.xml $BINPATH/rrdtool restore rrd/temp.xml rrd/temp.rrd rm -f rrd/temp.xml $BINPATH/rrdtool tune rrd/temp.rrd -r refused:crefused -r ds1:msrefused mv -f rrd/temp.rrd rrd/$nn done fi
hotsanic |
Subversion Repositories: |
Line No. | Rev | Author | Line |
---|