#!/bin/sh #------------------------------------------------------------------------------ # OPT_EMBEDDED /etc/rrdtool/fscpc.rrd __FLI4LVER__ # Creation: 2005-12-23 gdw # Last Update: $Id$ # # rrdtool x7sla DB-erstellen #------------------------------------------------------------------------------ [ -z "$RDTOOL_CONF_LOADED" ] && . /var/run/rrdtool.conf . /etc/rrdtool/rrdtool-helper local source=x7sla 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}-vcore:GAUGE:$heartbeat:U:U \ DS:${item}-12:GAUGE:$heartbeat:U:U \ DS:${item}-33:GAUGE:$heartbeat:U:U \ DS:${item}-vcc:GAUGE:$heartbeat:U:U \ DS:${item}-vdimm:GAUGE:$heartbeat:U:U \ DS:${item}-5:GAUGE:$heartbeat:U:U \ DS:${item}-15:GAUGE:$heartbeat:U:U \ DS:${item}-3vsb:GAUGE:$heartbeat:U:U \ DS:${item}-bat:GAUGE:$heartbeat:U:U \ $rrdaverage $rrdmin $rrdmax ;; "cpuspeed") rrdtool create $db_file --step 60 \ DS:${item}:GAUGE:$heartbeat:U:U \ $rrdaverage $rrdmin $rrdmax ;; "fan") rrdtool create $db_file --step 60 \ DS:${item}-bck:GAUGE:$heartbeat:U:U \ DS:${item}-ps:GAUGE:$heartbeat:U:U \ DS:${item}-fnt:GAUGE:$heartbeat:U:U \ DS:${item}-mch:GAUGE:$heartbeat:U:U \ $rrdaverage $rrdmin $rrdmax ;; esac else rrdheartbeat_change fi done