$VAL){ if(preg_match('/^fan_/',$NAME[$KEY])){ $ds_name[1] = "Fan Speed"; $opt[1] = "-X0 --slope-mode -u $max_rpm --vertical-label \"RPMs\" --title \"HPASM Fan Speed\" "; if(!isset($def[1])){ $def[1] = ""; } $def[1] .= "DEF:ovar$KEY=$RRDFILE[$KEY]:$DS[$KEY]:AVERAGE " ; $def[1] .= "CDEF:var$KEY=ovar$KEY,100,/,$max_rpm,* " ; $def[1] .= "LINE:var$KEY#".$colors[$col_f].":\"$NAME[$KEY]\" " ; $def[1] .= "GPRINT:var$KEY:LAST:\"%6.0lf RPM LAST \" "; $def[1] .= "GPRINT:var$KEY:MAX:\"%6.0lf RPM MAX \" "; $def[1] .= "GPRINT:var$KEY:AVERAGE:\"%6.2lf RPM AVERAGE \\n\" "; $col_f++; } if(preg_match('/^temp_/',$NAME[$KEY])){ $ds_name[2] = "Temperature"; $opt[2] = "--slope-mode --vertical-label \"Grad Celsius\" --title \"HPASM Temperature\" "; if(!isset($def[2])){ $def[2] = ""; } $def[2] .= "DEF:var$KEY=$RRDFILE[$KEY]:$DS[$KEY]:AVERAGE " ; $def[2] .= "LINE:var$KEY#".$colors[$col_t].":\"$NAME[$KEY]\\t\" " ; $def[2] .= "GPRINT:var$KEY:LAST:\"%6.0lf $UNIT[$KEY] LAST \" "; $def[2] .= "GPRINT:var$KEY:MAX:\"%6.0lf $UNIT[$KEY] MAX \" "; $def[2] .= "GPRINT:var$KEY:AVERAGE:\"%6.2lf $UNIT[$KEY] AVERAGE \\n\" "; $col_t++; } } ?>