From b026d88c53f54ae7ab57292be357a2f2603f5430 Mon Sep 17 00:00:00 2001 From: Nicolas Boisselier Date: Mon, 11 Apr 2016 14:01:50 +0200 Subject: [PATCH] db.status --- lib/php/db/types/mysql.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/php/db/types/mysql.php b/lib/php/db/types/mysql.php index 1133b837..c01662f5 100644 --- a/lib/php/db/types/mysql.php +++ b/lib/php/db/types/mysql.php @@ -51,9 +51,12 @@ $DB_TYPES['mysql'] = array ( 'status_callback' => function(&$status) { #debug($status['GLOBAL.Open_tables']); #debug($status['VAR.max_connections']); + $status['connections_pcent'] = ( ($status['STATUS.Max_used_connections']*100) / $status['VARIABLES.max_connections'] ).'%'; return; foreach($status as $k=>$v) { - debug("$k $v"); + if (!preg_match('/^[A-Z]{3,}/',$k)) continue; + unset($status[$k]); + $status[$k] = $v; } }, -- 2.47.3