0
MIN-值
我想以最低值水平線(HRULE)在我的RRD-GRAPH有任何好的結果:(HRULE在rrdtool的
我只有一個數據源中的數據庫,結束腳本在PEARL編碼
#!/usr/bin/perl
use RRDs;
my $cur_time = time();
my $start_time = $cur_time - 86400; # sätt start ill 24 timmar sedan
my $end_1 = time() - 86400;
my $start_1 = $end_1 - 86400;
RRDs::graph "/var/www/ute.png",
"--start= $start_time",
"--end= $cur_time",
"--title= outdoor temperature 1-WIRE 24h",
"--height= 600",
"--width= 1000",
"--vertical-label= °C",
"--upper-limit= 30",
"--lower-limit= -30",
"DEF:Temperatur=/home/nordviken/rrddata/ute_temp.rrd:ute:AVERAGE",
"CDEF:a=Temperatur,-50,0,LIMIT",
"DEF:b=/home/nordviken/rrddata/ute_temp.rrd:ute:AVERAGE:end= $end_1:start= $start_1",
"SHIFT:b:86400",
"COMMENT:\t\t\t\t Nu Medel Max Min\\n",
"HRULE:0#003300",
"LINE1:Temperatur#ff0000:ute\t\t\t\t",
"LINE1:a#0000ff",
"LINE1:b#00ff00",
"GPRINT:Temperatur:LAST:%6.1lf",
"GPRINT:Temperatur:AVERAGE:%6.1lf",
"GPRINT:Temperatur:MAX:%6.1lf",
"GPRINT:Temperatur:MIN:%6.1lf\\n";
my $err=RRDs::error;
if ($err) {print "problem med att skapa grafen: $err\n";}
print "klar!\n"
謝謝,我會努力的!我已經*忘記了曾在這裏這個問題:) – Eriel72
謝謝託比!它工作得很好! – Eriel72
然後請將問題標記爲已接受:) –