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"); }