#!/bin/sh #------------------------------------------------------------------------------ # OPT_EMBEDDED /etc/rrdtool/p640.rrd __FLI4LVER__ # Creation: 2005-12-23 gdw # Last Update: $Id$ # # rrdtool p640 DB-erstellen #------------------------------------------------------------------------------ [ -z "$RDTOOL_CONF_LOADED" ] && . /var/run/rrdtool.conf . /etc/rrdtool/rrdtool-helper local source=p640 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 "fan") rrdtool create $db_file --step 60 \ DS:${item}-cpu:GAUGE:$heartbeat:U:U \ DS:${item}-sys:GAUGE:$heartbeat:U:U \ $rrdaverage $rrdmin $rrdmax ;; "cpuspeed") rrdtool create $db_file --step 60 \ DS:${item}:GAUGE:$heartbeat:U:U \ $rrdaverage $rrdmin $rrdmax ;; "temperature") rrdtool create $db_file --step 60 \ DS:${item}-cpu:GAUGE:$heartbeat:U:U \ DS:${item}-pcb:GAUGE:$heartbeat:U:U \ $rrdaverage $rrdmin $rrdmax ;; "voltage") rrdtool create $db_file --step 60 \ DS:${item}-15:GAUGE:$heartbeat:U:U \ DS:${item}-25:GAUGE:$heartbeat:U:U \ DS:${item}-33:GAUGE:$heartbeat:U:U \ DS:${item}-50:GAUGE:$heartbeat:U:U \ DS:${item}-12:GAUGE:$heartbeat:U:U \ DS:${item}-13:GAUGE:$heartbeat:U:U \ $rrdaverage $rrdmin $rrdmax ;; esac else rrdheartbeat_change fi done