From f07c96ee5f932a83b571ae8caaa821877d4b75e3 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Wed, 1 Jun 2016 07:04:31 +0200 Subject: [PATCH] New class "dbm" for the database management --- include/dbm.php | 26 ++++++++++++++++++++++++++ index.php | 5 +++++ 2 files changed, 31 insertions(+) create mode 100644 include/dbm.php diff --git a/include/dbm.php b/include/dbm.php new file mode 100644 index 0000000000..f68987c235 --- /dev/null +++ b/include/dbm.php @@ -0,0 +1,26 @@ + $usage) { + if ($statelist != "") + $statelist .= ", "; + $statelist .= $state.": ".$usage; + } + return($statelist); + } +} +?> diff --git a/index.php b/index.php index 73f46cfbef..ec72771341 100644 --- a/index.php +++ b/index.php @@ -41,6 +41,7 @@ $install = ((file_exists('.htconfig.php') && filesize('.htconfig.php')) ? false */ require_once("include/dba.php"); +require_once("include/dbm.php"); if(!$install) { $db = new dba($db_host, $db_user, $db_pass, $db_data, $install); @@ -53,6 +54,10 @@ if(!$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;