blob: a063228dc8659fadc45899ad3a3ec7786598976e [file] [log] [blame]
<?php
require_once($_SERVER['DOCUMENT_ROOT'] ."/eclipse.org-common/system/app.class.php");
require_once("/home/data/httpd/eclipse-php-classes/menu/menu.class.php");
#*****************************************************************************
#
# loadstats.php
#
# Author: M. Ward
# Date: 2006-05-08
#
# Description: show the load stats for the last 24 hours on the servers.
#
#
#
#
# HISTORY:
#
#****************************************************************************
//set the default debug level nice and low
define('DEBUG',0);
define('BASEPATH','/home/data/common/monitor/loadstats/');
$App = new App();
$App->preventCaching();
//connect to ldap
$Session = $App->useSession('required');
$Friend = $Session->getFriend();
if (!$Friend->getIsCommitter()){
header("HTTP/1.1 403 Forbidden");
exit;
}
include "../html/header.php";
$Menu = new Menu("en");
include("../modules/menu.php");
//var_dump(gd_info());
//current date info
$today=date('d');
$month = date ('n');
$year = date('Y');
//now the main processing loop.
//get all of the directory entries
foreach( glob(BASEPATH . "*") as $server ){
if ( DEBUG == 1)
echo "Gathering data for $server \n\r ";
//check that the name is acutally a dir. TRUE if it is
if( is_dir( $server ) == TRUE ) {
echo "<a href=\"showmonthstats.php?server=$server&month=$month&year=$year\"><img src='drawstats.php?server=$server&month=$month&year=$year'></a></br>";
}
}
include "../html/footer.php";