mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-22 14:16:00 +00:00
Plguin mysql_size_all: minor cleanup
This commit is contained in:
parent
f468341a07
commit
07c854f276
1 changed files with 1 additions and 7 deletions
|
@ -65,8 +65,6 @@ if ($arg eq 'config') {
|
||||||
sub getDBList;
|
sub getDBList;
|
||||||
foreach my $db (getDBList()) {
|
foreach my $db (getDBList()) {
|
||||||
|
|
||||||
my $datas = 0;
|
|
||||||
my $indexes = 0;
|
|
||||||
my (@infos,$info,$i_data,$i_index);
|
my (@infos,$info,$i_data,$i_index);
|
||||||
|
|
||||||
$COMMAND = "$MYSQLADMIN $ENV{mysqlopts} $db -e 'show table status;' | head -n 1";
|
$COMMAND = "$MYSQLADMIN $ENV{mysqlopts} $db -e 'show table status;' | head -n 1";
|
||||||
|
@ -100,16 +98,12 @@ foreach my $db (getDBList()) {
|
||||||
|
|
||||||
while (<SERVICE>) {
|
while (<SERVICE>) {
|
||||||
(m/(\d+).*?(\d+(?:\.\d+)?)/);
|
(m/(\d+).*?(\d+(?:\.\d+)?)/);
|
||||||
$datas += $1;
|
$total_size += $1 + $2;
|
||||||
$indexes += $2;
|
|
||||||
}
|
}
|
||||||
close(SERVICE);
|
close(SERVICE);
|
||||||
|
|
||||||
$total_size = $datas+$indexes;
|
|
||||||
}
|
}
|
||||||
print("$db.value $total_size\n");
|
print("$db.value $total_size\n");
|
||||||
# print("datas.value $datas\n");
|
|
||||||
# print("index.value $indexes\n");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue