2003-11-19 08:15:23 +00:00
|
|
|
<?PHP // $Id$
|
|
|
|
// dbperformance.php - shows latest ADOdb stats for the current server
|
|
|
|
|
2006-03-06 10:02:59 +00:00
|
|
|
require_once('../config.php');
|
2003-11-19 08:15:23 +00:00
|
|
|
|
2006-09-25 19:05:04 +00:00
|
|
|
// disable moodle specific debug messages that would be breaking the frames
|
|
|
|
disable_debugging();
|
|
|
|
|
2006-03-06 10:02:59 +00:00
|
|
|
$topframe = optional_param('topframe', 0, PARAM_BOOL);
|
|
|
|
$bottomframe = optional_param('bottomframe', 0, PARAM_BOOL);
|
|
|
|
$do = optional_param('do', '', PARAM_ALPHA);
|
2005-06-15 12:31:09 +00:00
|
|
|
|
2003-11-19 08:15:23 +00:00
|
|
|
require_login();
|
|
|
|
|
2006-08-25 08:27:27 +00:00
|
|
|
require_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM, SITEID));
|
2003-11-19 08:15:23 +00:00
|
|
|
|
|
|
|
$strdatabaseperformance = get_string("databaseperformance");
|
|
|
|
$stradministration = get_string("administration");
|
|
|
|
$site = get_site();
|
|
|
|
|
2005-06-15 12:31:09 +00:00
|
|
|
if (!empty($topframe)) {
|
2005-05-16 19:38:21 +00:00
|
|
|
print_header("$site->shortname: $strdatabaseperformance", "$site->fullname",
|
2003-11-19 08:15:23 +00:00
|
|
|
"<a target=\"$CFG->framename\" href=\"index.php\">$stradministration</a> -> Database performance");
|
|
|
|
exit;
|
|
|
|
}
|
|
|
|
|
2005-06-15 12:31:09 +00:00
|
|
|
if (!empty($bottomframe) or !empty($do)) {
|
2003-11-19 08:15:23 +00:00
|
|
|
$perf =&NewPerfMonitor($db);
|
|
|
|
$perf->UI($pollsecs=5);
|
|
|
|
exit;
|
|
|
|
}
|
|
|
|
|
|
|
|
?>
|
|
|
|
<head>
|
|
|
|
<title><?php echo "$site->shortname: $strdatabaseperformance" ?></title>
|
|
|
|
</head>
|
|
|
|
|
|
|
|
<frameset rows="80,*">
|
|
|
|
<frame src="dbperformance.php?topframe=true">
|
|
|
|
<frame src="dbperformance.php?bottomframe=true">
|
|
|
|
</frameset>
|