1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-07-21 18:41:03 +00:00

Plguin mysql_size_all: minor cleanup

This commit is contained in:
Lars Kruse 2020-03-26 02:44:33 +01:00
parent f468341a07
commit 07c854f276

View file

@ -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 (<SERVICE>) {
(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");
}