From 07c854f276d4cc4de536ca1024b7cd3e76bca148 Mon Sep 17 00:00:00 2001 From: Lars Kruse Date: Thu, 26 Mar 2020 02:44:33 +0100 Subject: [PATCH] Plguin mysql_size_all: minor cleanup --- plugins/mysql/mysql_size_all | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/plugins/mysql/mysql_size_all b/plugins/mysql/mysql_size_all index 2dcc3665..6d5da300 100755 --- a/plugins/mysql/mysql_size_all +++ b/plugins/mysql/mysql_size_all @@ -65,8 +65,6 @@ if ($arg eq 'config') { sub getDBList; foreach my $db (getDBList()) { - my $datas = 0; - my $indexes = 0; my (@infos,$info,$i_data,$i_index); $COMMAND = "$MYSQLADMIN $ENV{mysqlopts} $db -e 'show table status;' | head -n 1"; @@ -100,16 +98,12 @@ foreach my $db (getDBList()) { while () { (m/(\d+).*?(\d+(?:\.\d+)?)/); - $datas += $1; - $indexes += $2; + $total_size += $1 + $2; } close(SERVICE); - $total_size = $datas+$indexes; } print("$db.value $total_size\n"); -# print("datas.value $datas\n"); -# print("index.value $indexes\n"); }