header Content-type image png opts array --imgformat PNG --start -1h -

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<?
header("Content-type: image/png");
$opts = array("--imgformat=PNG",
"--start -1h",
"--end=now",
"--width 783 --height 230",
"--x-grid MINUTE:1:MINUTE:5:MINUTE:5:0:\"%H:%M\"",
"--y-grid=1.15:1",
"DEF:in=/opt/chiler_temp.rrd:in:AVERAGE",
"DEF:out=/opt/chiler_temp.rrd:out:AVERAGE",
"DEF:street=/opt/chiler_temp.rrd:street:AVERAGE",
"LINE2:in#FC5656:\"In\"",
"LINE2:out#61A3FF:\"Out\"",
"LINE1.5:street#FF29FF:\"Street\l\"");
$opts_str = implode(" ", $opts);
//print $opts_str;
print shell_exec("/usr/bin/rrdtool graph - $opts_str");
?>