#!/bin/sh #------------------------------------------------------------------------------ # OPT_EMBEDDED /etc/rrdtool/p640.params __FLI4LVER__ # Creation: 2008-05-01 Joe # Last Update: $Id$ #------------------------------------------------------------------------------ RRDTOOL_PARAMS_LOADED_p640='yes' local graph_title= local graph_unit= local graph_fmt= rrdtool_gen_params_p640() { local item=$1 eval rrdtool_gen_params_p640_$item } rrdtool_gen_params_p640_fan() { graph_title="$_FAN_title" graph_unit="$_FAN_unit" graph_fmt="%4.1lf" local graph_ds1="$_FAN_ds1" local graph_ds2="$_FAN_ds2" rrdtool_addCache "-c BACK#eeeeee -l 0" rrdtool_addCache "-t '$graph_title' -v '$graph_unit'" rrdtool_addCache "DEF:cpu_avg=$rrdFile:fan-cpu:AVERAGE" rrdtool_addCache "DEF:sys_avg=$rrdFile:fan-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_p640_cpuspeed() { graph_title="$_MHZ_title" graph_unit="$_MHZ_unit" graph_fmt="%4.0lf" local graph_ds1="$_MHZ_ds1" rrdtool_addCache "-c BACK#eeeeee -l 0" rrdtool_addCache "-t '$graph_title' -v '$graph_unit'" rrdtool_addCache "DEF:cpuspeed_avg=$rrdFile:cpuspeed:AVERAGE" # rrdtool_addCache "DEF:cpu_min=$rrdFile:temperature-cpu:MIN" # rrdtool_addCache "DEF:cpu_max=$rrdFile:temperature-cpu:MAX" rrdtool_gen_defStats 'cpuspeed_avg_stats' 'cpuspeed_avg' rrdtool_gen_printHeader ${#graph_ds1} rrdtool_addCache "LINE1:cpuspeed_avg#FF0000:'$graph_ds1'" rrdtool_gen_printStats 'cpuspeed_avg_stats' } rrdtool_gen_params_p640_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:pcb_avg=$rrdFile:temperature-pcb: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' 'pcb_avg_stats' 'pcb_avg' rrdtool_gen_printHeader ${#graph_ds1} rrdtool_addCache "LINE1:cpu_avg#FF0000:'$graph_ds1'" rrdtool_gen_printStats 'cpu_avg_stats' rrdtool_addCache "LINE1:pcb_avg#0000FF:'$graph_ds2'" rrdtool_gen_printStats 'pcb_avg_stats' } rrdtool_gen_params_p640_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" local graph_ds4="$_VOLT_ds4" local graph_ds5="$_VOLT_ds5" local graph_ds6="$_VOLT_ds6" rrdtool_addCache "-t '$graph_title' -v '$graph_unit'" rrdtool_addCache "DEF:avg_15=$rrdFile:voltage-15:AVERAGE" rrdtool_addCache "DEF:avg_25=$rrdFile:voltage-25:AVERAGE" rrdtool_addCache "DEF:avg_33=$rrdFile:voltage-33:AVERAGE" rrdtool_addCache "DEF:avg_50=$rrdFile:voltage-50:AVERAGE" rrdtool_addCache "DEF:avg_12=$rrdFile:voltage-12:AVERAGE" rrdtool_addCache "DEF:avg_13=$rrdFile:voltage-13:AVERAGE" rrdtool_addCache "-A" rrdtool_gen_defStats 'avg_15_stats' 'avg_15' rrdtool_gen_defStats 'avg_25_stats' 'avg_25' rrdtool_gen_defStats 'avg_33_stats' 'avg_33' rrdtool_gen_defStats 'avg_50_stats' 'avg_50' rrdtool_gen_defStats 'avg_12_stats' 'avg_12' rrdtool_gen_defStats 'avg_13_stats' 'avg_13' rrdtool_gen_printHeader ${#graph_ds1} rrdtool_addCache "LINE1:avg_15#FF0000:'$graph_ds1'" rrdtool_gen_printStats 'avg_15_stats' rrdtool_addCache "LINE1:avg_25#FFFF00:'$graph_ds2'" rrdtool_gen_printStats 'avg_25_stats' rrdtool_addCache "LINE1:avg_33#00FF00:'$graph_ds3'" rrdtool_gen_printStats 'avg_33_stats' rrdtool_addCache "LINE1:avg_50#00FFFF:'$graph_ds4'" rrdtool_gen_printStats 'avg_50_stats' rrdtool_addCache "LINE1:avg_12#FF00FF:'$graph_ds5'" rrdtool_gen_printStats 'avg_12_stats' rrdtool_addCache "LINE1:avg_13#0000FF:'$graph_ds6'" rrdtool_gen_printStats 'avg_13_stats' }