#!/bin/sh #------------------------------------------------------------------------------ # OPT_EMBEDDED /etc/rrdtool/fscpc.params __FLI4LVER__ # Creation: 2008-05-01 Joe # Last Update: $Id$ #------------------------------------------------------------------------------ RRDTOOL_PARAMS_LOADED_fscpc='yes' local graph_title= local graph_unit= local graph_fmt= rrdtool_gen_params_fscpc() { local item=$1 eval rrdtool_gen_params_fscpc_$item } rrdtool_gen_params_fscpc_temperature() { graph_title="$_TEMP_title" graph_unit="$_TEMP_unit" graph_fmt="%4.1lf" local graph_ds1="$_TEMP_ds1" local graph_ds2="$_TEMP_ds2" rrdtool_addCache "-c BACK#eeeeee -l 0" rrdtool_addCache "-t '$graph_title' -v '$graph_unit'" rrdtool_addCache "DEF:cpu_avg=$rrdFile:temperature-cpu:AVERAGE" rrdtool_addCache "DEF:sys_avg=$rrdFile:temperature-sys:AVERAGE" # rrdtool_addCache "DEF:cpu_min=$rrdFile:temperature-cpu:MIN" # rrdtool_addCache "DEF:cpu_max=$rrdFile:temperature-cpu:MAX" rrdtool_gen_defStats 'cpu_avg_stats' 'cpu_avg' 'sys_avg_stats' 'sys_avg' rrdtool_gen_printHeader ${#graph_ds1} rrdtool_addCache "LINE1:cpu_avg#FF0000:'$graph_ds1'" rrdtool_gen_printStats 'cpu_avg_stats' rrdtool_addCache "LINE1:sys_avg#0000FF:'$graph_ds2'" rrdtool_gen_printStats 'sys_avg_stats' } rrdtool_gen_params_fscpc_voltage() { graph_title="$_VOLT_title" graph_unit="$_VOLT_unit" graph_fmt="%4.1lf" local graph_ds1="$_VOLT_ds1" local graph_ds2="$_VOLT_ds2" local graph_ds3="$_VOLT_ds3" rrdtool_addCache "-t '$graph_title' -v '$graph_unit'" rrdtool_addCache "DEF:avg_12=$rrdFile:voltage-12:AVERAGE" rrdtool_addCache "DEF:avg_5=$rrdFile:voltage-5:AVERAGE" rrdtool_addCache "DEF:avg_3=$rrdFile:voltage-3:AVERAGE" rrdtool_addCache "-A" rrdtool_gen_defStats 'avg_12_stats' 'avg_12' rrdtool_gen_defStats 'avg_5_stats' 'avg_5' rrdtool_gen_defStats 'avg_3_stats' 'avg_3' rrdtool_gen_printHeader ${#graph_ds1} rrdtool_addCache "LINE1:avg_12#FF0000:'$graph_ds1'" rrdtool_gen_printStats 'avg_12_stats' rrdtool_addCache "LINE1:avg_5#00FF00:'$graph_ds2'" rrdtool_gen_printStats 'avg_5_stats' rrdtool_addCache "LINE1:avg_3#0000FF:'$graph_ds3'" rrdtool_gen_printStats 'avg_3_stats' }