Files
librenms-librenms/html/graph.php
Tony Murray e80a385b7f RRDtool dual process (remote creation/check) (#4104)
* Prepare for dual rrdtool processes
Disabled at this time
Split out rrdtool version checks into rrdtool_create_command()
Tests for rrdtool_create_command()
Fixes a few small issues.

* Enable dual process and remote rrd check/creation

* remove full path for remote commands

* Doc updates
minor fix to rrdtool_tune()

* Set up bootstrap for phpunit
Fix issues with FileExistsException

* Attempt to fix phpunit

* Fix classloader and bootstrap to use full paths only (not depending on $config)

* Fix phpunit tests, config.php does not exist.
2016-08-22 16:32:05 +01:00

62 lines
2.0 KiB
PHP

<?php
/**
* LibreNMS
*
* This file is part of LibreNMS.
*
* @package librenms
* @subpackage graphing
* @author Adam Armstrong <adama@memetic.org>
* @copyright (C) 2006 - 2012 Adam Armstrong
*/
$start = microtime(true);
require_once 'Net/IPv4.php';
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 {
$debug = false;
ini_set('display_errors', 0);
ini_set('display_startup_errors', 0);
ini_set('log_errors', 0);
ini_set('error_reporting', 0);
}
require_once '../includes/defaults.inc.php';
require_once '../config.php';
require_once '../includes/definitions.inc.php';
// initialize the class loader and add custom mappings
require_once $config['install_dir'] . '/LibreNMS/ClassLoader.php';
$classLoader = new LibreNMS\ClassLoader();
$classLoader->registerClass('Console_Color2', $config['install_dir'] . '/includes/console_colour.php');
$classLoader->registerClass('PasswordHash', $config['install_dir'] . '/html/lib/PasswordHash.php');
$classLoader->register();
require_once '../includes/common.php';
require_once '../includes/dbFacile.php';
require_once '../includes/rewrites.php';
require_once 'includes/functions.inc.php';
require_once '../includes/rrdtool.inc.php';
if ($config['allow_unauth_graphs'] != true) {
require_once 'includes/authenticate.inc.php';
}
require 'includes/graphs/graph.inc.php';
$console_color = new Console_Color2();
$end = microtime(true);
$run = ($end - $start);
d_echo('<br />Runtime '.$run.' secs');
d_echo('<br />MySQL: Cell '.($db_stats['fetchcell'] + 0).'/'.round(($db_stats['fetchcell_sec'] + 0), 3).'s'.' Row '.($db_stats['fetchrow'] + 0).'/'.round(($db_stats['fetchrow_sec'] + 0), 3).'s'.' Rows '.($db_stats['fetchrows'] + 0).'/'.round(($db_stats['fetchrows_sec'] + 0), 3).'s'.' Column '.($db_stats['fetchcol'] + 0).'/'.round(($db_stats['fetchcol_sec'] + 0), 3).'s');