#!/bin/sh #------------------------------------------------------------------------------ # OPT_EMBEDDED /etc/rrdtool/fscpc.rrd __FLI4LVER__ # Creation: 2005-12-23 gdw # Last Update: $Id$ # # rrdtool fscpc DB-erstellen #------------------------------------------------------------------------------ [ -z "$RDTOOL_CONF_LOADED" ] && . /var/run/rrdtool.conf . /etc/rrdtool/rrdtool-helper local source=fscpc eval local idx='$RRDTOOL_'$source'_ID' eval local options='$RRDTOOL_'$idx'_OPTIONS_STRING' for item in $options do local db_file=$RRDTOOL_DB_PATH/$source/$item.rrd if [ ! -f $db_file ] then echo 'creating new database for "'$source'" - "'$item'"' case "$item" in "temperature") rrdtool create $db_file --step 60 \ DS:${item}-cpu:GAUGE:$heartbeat:U:U \ DS:${item}-sys:GAUGE:$heartbeat:U:U \ $rrdaverage $rrdmin $rrdmax ;; "voltage") rrdtool create $db_file --step 60 \ DS:${item}-12:GAUGE:$heartbeat:U:U \ DS:${item}-5:GAUGE:$heartbeat:U:U \ DS:${item}-3:GAUGE:$heartbeat:U:U \ $rrdaverage $rrdmin $rrdmax ;; esac else rrdheartbeat_change fi done