aewin_temp_graph ()
{
last_x="$1"
/usr/bin/rrdtool graph /srv/www/img/aewintemp-$last_x.png --title "aewin-Temperaturen - $last_x" \
--imginfo '' \
$rrd_width $rrd_height $rrd_common_opts --watermark "$rrd_watermark" \
--end now --start end-${last_x} \
--vertical-label "aewin-Temperaturen" \
--font "WATERMARK:8" \
$rrd_grid_background \
DEF:pcb=${rrd_dbpath}/sensors-w83627hf-isa-0920/temperature-temp1.rrd:value:AVERAGE \
DEF:cpu=${rrd_dbpath}/sensors-w83627hf-isa-0920/temperature-temp2.rrd:value:AVERAGE \
VDEF:pcb_max=pcb,MAXIMUM \
VDEF:pcb_avg=pcb,AVERAGE \
VDEF:pcb_min=pcb,MINIMUM \
VDEF:pcb_last=pcb,LAST \
VDEF:cpu_max=cpu,MAXIMUM \
VDEF:cpu_avg=cpu,AVERAGE \
VDEF:cpu_min=cpu,MINIMUM \
VDEF:cpu_last=cpu,LAST \
COMMENT:"\t\t\g" \
COMMENT:"Maximum\t\t\g" \
COMMENT:"Average\t\t\g" \
COMMENT:"Minimum\t\t\g" \
COMMENT:"Last\l" \
LINE1:cpu#FF0000:"CPU\t\t\g" \
GPRINT:cpu_max:"%.1lf\t\t\g" \
GPRINT:cpu_avg:"%.1lf\t\t\g" \
GPRINT:cpu_min:"%.1lf\t\t\g" \
GPRINT:cpu_last:"%.1lf\l" \
LINE2:pcb#0000FF:"Mainboard\t\g" \
GPRINT:pcb_max:"%.1lf\t\t\g" \
GPRINT:pcb_avg:"%.1lf\t\t\g" \
GPRINT:pcb_min:"%.1lf\t\t\g" \
GPRINT:pcb_last:"%.1lf\l" \
COMMENT:"\n" \
COMMENT:"Letztes update\:\t$rrd_last_update"
}
aewin_voltage_graph ()
{
last_x="$1"
/usr/bin/rrdtool graph /srv/www/img/aewinvoltage-$last_x.png --title "AEWIN-Spannungen - $last_x" \
--imginfo '' \
$rrd_width $rrd_height $rrd_common_opts --watermark "$rrd_watermark" \
--end now --start end-${last_x} \
--vertical-label "AEWIN-Spannungen" \
--font "WATERMARK:8" \
$rrd_grid_background \
DEF:vcore1=${rrd_dbpath}/sensors-w83627hf-isa-0920/voltage-in0.rrd:value:AVERAGE \
DEF:vcore2=${rrd_dbpath}/sensors-w83627hf-isa-0920/voltage-in1.rrd:value:AVERAGE \
DEF:v33=${rrd_dbpath}/sensors-w83627hf-isa-0920/voltage-in2.rrd:value:AVERAGE \
DEF:v5=${rrd_dbpath}/sensors-w83627hf-isa-0920/voltage-in3.rrd:value:AVERAGE \
DEF:vcc=${rrd_dbpath}/sensors-w83627hf-isa-0920/voltage-in7.rrd:value:AVERAGE \
DEF:vbat=${rrd_dbpath}/sensors-w83627hf-isa-0920/voltage-in8.rrd:value:AVERAGE \
VDEF:vcore1_avg=vcore1,AVERAGE \
VDEF:vcore2_avg=vcore2,AVERAGE \
VDEF:v33_avg=v33,AVERAGE \
VDEF:v5_avg=v5,AVERAGE \
VDEF:vcc_avg=vcc,AVERAGE \
VDEF:vbat_avg=vbat,AVERAGE \
VDEF:vcore1_last=vcore1,LAST \
VDEF:vcore2_last=vcore2,LAST \
VDEF:v33_last=v33,LAST \
VDEF:v5_last=v5,LAST \
VDEF:vcc_last=vcc,LAST \
VDEF:vbat_last=vbat,LAST \
COMMENT:"\t\t\g" \
COMMENT:"Average\t\t\g" \
COMMENT:"Last\l" \
LINE1:vcore1#FF0000:"VCore1\t\t\g" \
GPRINT:vcore1_avg:"V.1lf\t\t\g" \
GPRINT:vcore1_last:"V.1lf\l" \
LINE2:vcore2#FFFF00:"VCore2\t\t\g" \
GPRINT:vcore2_avg:"V.1lf\t\t\g" \
GPRINT:vcore2_last:"V.1lf\l" \
LINE3:vcore1#00FF00:"V3.3\t\t\g" \
GPRINT:v33_avg:"V.1lf\t\t\g" \
GPRINT:v33_last:"V.1lf\l" \
LINE4:v5#00FFFF:"V5\t\t\g" \
GPRINT:v5_avg:"V.1lf\t\t\g" \
GPRINT:v5_last:"V.1lf\l" \
LINE5:vcc#FF00FF:"VCC\t\t\g" \
GPRINT:vcc_avg:"V.1lf\t\t\g" \
GPRINT:vcc_last:"V.1lf\l" \
LINE6:vbat#0000FF:"VBat\t\t\g" \
GPRINT:vbat_avg:"V.1lf\t\t\g" \
GPRINT:vbat_last:"V.1lf\l" \
COMMENT:"\n" \
COMMENT:"Letztes update\:\t$rrd_last_update"
}