From 02ec539a551ad439eeda2d6236bda634ba8b36b9 Mon Sep 17 00:00:00 2001 From: Greg Sabino Mullane Date: Tue, 28 Dec 2010 17:07:32 -0500 Subject: More tweaks to bloat display. --- check_postgres.pl | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'check_postgres.pl') diff --git a/check_postgres.pl b/check_postgres.pl index e38010174..17dea5efa 100755 --- a/check_postgres.pl +++ b/check_postgres.pl @@ -2844,21 +2844,21 @@ FROM ( for my $r (@{$db->{slurp}}) { - my ($dbname,$schema,$table,$tups,$pages,$otta,$bloat,$wp,$wb) = @$r{ - qw/ db schemaname tablename tups pages otta tbloat wastedpages wastedbytes/}; - my $ws = pretty_size($wb); - my ($index,$irows,$ipages,$iotta,$ibloat,$iwp,$iwb) = @$r{ - qw/ iname irows ipages iotta ibloat wastedipgaes wastedibytes/}; - my $iws = pretty_size($iwb); + for my $v (values %$r) { + $v =~ s/(\d+) bytes/pretty_size($1,1)/ge; + } + + my ($dbname,$schema,$table,$tups,$pages,$otta,$bloat,$wp,$wb,$ws) = @$r{ + qw/ db schemaname tablename tups pages otta tbloat wastedpages wastedbytes wastedsize/}; + next if skip_item($table, $schema); + my ($index,$irows,$ipages,$iotta,$ibloat,$iwp,$iwb,$iws) = @$r{ + qw/ iname irows ipages iotta ibloat wastedipgaes wastedibytes wastedisize/}; + ## Made it past the exclusions $max = -2 if $max == -1; - for my $v (values %$r) { - $v =~ s/\| (\d+) bytes/'| ' . pretty_size($1,1)/ge; - } - ## Do the table first if we haven't seen it if (! $seenit{"$dbname.$schema.$table"}++) { $db->{perf} = " $schema.$table=$wb"; @@ -8760,7 +8760,7 @@ Items not specifically attributed are by Greg Sabino Mullane. =over 4 -=item B +=item B December 28, 2010 Better formatting of sizes in the bloat action output. -- cgit v1.2.3