librenms/html/graph.php

45 lines
903 B
PHP
Raw Normal View History

<?php
/**
2016-08-20 11:16:55 +00:00
* LibreNMS
*
2016-08-20 11:16:55 +00:00
* This file is part of LibreNMS.
*
2016-08-20 11:16:55 +00:00
* @package librenms
2013-10-28 19:38:12 +00:00
* @subpackage graphing
* @copyright (C) 2006 - 2012 Adam Armstrong
*/
2015-07-13 18:10:26 +00:00
$start = microtime(true);
2015-07-13 18:10:26 +00: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);
} else {
2015-07-13 18:10:26 +00:00
$debug = false;
ini_set('display_errors', 0);
ini_set('display_startup_errors', 0);
ini_set('log_errors', 0);
ini_set('error_reporting', 0);
}
$init_modules = array('web', 'graphs');
require realpath(__DIR__ . '/..') . '/includes/init.php';
rrdtool_initialize(false);
require $config['install_dir'] . '/html/includes/graphs/graph.inc.php';
rrdtool_close();
if ($debug) {
echo '<br />';
printf("Runtime %.3fs", microtime(true) - $start);
echo '<br />';
printStats();
}