Added note about cgroup2 protection
[ampy.git] / html / lastupdate.php
1 <!DOCTYPE html>
2 <meta charset="UTF-8">
3
4 <?php
5 require_once('config.php');
6
7 #echo("getenv:".getenv('RRDCACHED_ADDRESS')."\n");
8 #echo("env:".$_ENV['RRDCACHED_ADDRESS']."\n");
9
10 #if (!putenv("RRDCACHED_ADDRESS=/var/run/rrdcached.sock"))  # doesn't work :/
11 #       trigger_error("putenv failed!");
12 #if (!apache_putenv("RRDCACHED_ADDRESS=/var/run/rrdcached.sock"))  # doesn't work :/
13 #       trigger_error("apache_putenv failed!");
14 #$_ENV['RRDCACHED_ADDRESS']='/var/run/rrdcached.sock';
15
16
17 $info=rrd_lastupdate(RRDFILE);
18 if ($info === FALSE)
19         echo("error in rrd_lastupdate: ".rrd_error());
20 else
21         print_r($info);
22 ?>