--- /dev/null
+<?php
+class dbm {
+ public static function processlist() {
+ $r = q("SHOW PROCESSLIST");
+ $s = array();
+
+ $states = array();
+ foreach ($r AS $process) {
+ $state = trim($process["State"]);
+ if (!in_array($state, array("", "init", "statistics")))
+ ++$states[$state];
+ }
+ // query end
+ // Sending data
+ // updating
+
+ $statelist = "";
+ foreach ($states AS $state => $usage) {
+ if ($statelist != "")
+ $statelist .= ", ";
+ $statelist .= $state.": ".$usage;
+ }
+ return($statelist);
+ }
+}
+?>
*/
require_once("include/dba.php");
+require_once("include/dbm.php");
if(!$install) {
$db = new dba($db_host, $db_user, $db_pass, $db_data, $install);
load_config('config');
load_config('system');
+ $processlist = dbm::processlist();
+ if ($processlist != "")
+ logger("Processlist: ".$processlist, LOGGER_DEBUG);
+
$maxsysload_frontend = intval(get_config('system','maxloadavg_frontend'));
if($maxsysload_frontend < 1)
$maxsysload_frontend = 50;