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:
parent
f468341a07
commit
07c854f276
1 changed files with 1 additions and 7 deletions
|
@ -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");
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue