2007-04-03 14:10:23 +00:00
|
|
|
<?php
|
|
|
|
|
2012-05-09 10:01:42 +00:00
|
|
|
/**
|
2016-08-20 12:16:55 +01:00
|
|
|
* LibreNMS
|
2012-05-09 10:01:42 +00:00
|
|
|
*
|
2016-08-20 12:16:55 +01:00
|
|
|
* This file is part of LibreNMS.
|
2012-05-09 10:01:42 +00:00
|
|
|
*
|
2016-08-20 12:16:55 +01:00
|
|
|
* @package librenms
|
2013-10-29 05:38:12 +10:00
|
|
|
* @subpackage graphing
|
|
|
|
* @copyright (C) 2006 - 2012 Adam Armstrong
|
2012-05-09 10:01:42 +00:00
|
|
|
*/
|
|
|
|
|
2015-07-13 20:10:26 +02:00
|
|
|
|
2016-01-08 13:33:32 +01:00
|
|
|
$start = microtime(true);
|
2012-03-27 13:59:31 +00:00
|
|
|
|
2015-07-13 20:10:26 +02:00
|
|
|
if (isset($_GET['debug'])) {
|
|
|
|
$debug = true;
|
|
|
|
ini_set('display_errors', 1);
|
|
|
|
ini_set('display_startup_errors', 0);
|
|
|
|
ini_set('log_errors', 0);
|
|
|
|
ini_set('error_reporting', E_ALL);
|
2016-08-18 20:28:22 -05:00
|
|
|
} else {
|
2015-07-13 20:10:26 +02:00
|
|
|
$debug = false;
|
|
|
|
ini_set('display_errors', 0);
|
|
|
|
ini_set('display_startup_errors', 0);
|
|
|
|
ini_set('log_errors', 0);
|
|
|
|
ini_set('error_reporting', 0);
|
2012-01-12 12:51:21 +00:00
|
|
|
}
|
|
|
|
|
2016-11-21 14:12:59 -06:00
|
|
|
$init_modules = array('web', 'graphs');
|
|
|
|
require realpath(__DIR__ . '/..') . '/includes/init.php';
|
2016-08-26 01:50:29 -05:00
|
|
|
|
|
|
|
rrdtool_initialize(false);
|
|
|
|
|
2016-11-21 14:12:59 -06:00
|
|
|
require $config['install_dir'] . '/html/includes/graphs/graph.inc.php';
|
2007-04-03 14:10:23 +00:00
|
|
|
|
2016-08-26 01:50:29 -05:00
|
|
|
rrdtool_close();
|
2015-03-01 17:06:38 +00:00
|
|
|
|
2016-11-23 00:57:19 -06:00
|
|
|
if ($debug) {
|
|
|
|
echo '<br />';
|
|
|
|
printf("Runtime %.3fs", microtime(true) - $start);
|
|
|
|
echo '<br />';
|
|
|
|
printStats();
|
|
|
|
}
|