diff options
author | Greg Sabino Mullane | 2010-12-27 23:33:35 +0000 |
---|---|---|
committer | Greg Sabino Mullane | 2010-12-27 23:33:35 +0000 |
commit | 59245016197d195de23258fc32e4194ef366e07b (patch) | |
tree | 617a543bbcff7d3c5d565cc05fa16c4d1eb52ce0 | |
parent | dfd300e16a733266c9e348fa4d8990eb98be7bff (diff) |
Better formatting of sizes in "bloat" action.2.15.0
-rwxr-xr-x | check_postgres.pl | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/check_postgres.pl b/check_postgres.pl index 2d86e452f..965df8b4a 100755 --- a/check_postgres.pl +++ b/check_postgres.pl @@ -30,7 +30,7 @@ $Data::Dumper::Varname = 'POSTGRES'; $Data::Dumper::Indent = 2; $Data::Dumper::Useqq = 1; -our $VERSION = '2.15.1'; +our $VERSION = '2.15.2'; use vars qw/ %opt $PSQL $res $COM $SQL $db /; @@ -2844,11 +2844,12 @@ FROM ( for my $r (@{$db->{slurp}}) { - my ($dbname,$schema,$table,$tups,$pages,$otta,$bloat,$wp,$wb,$ws) = @$r{ - qw/ db schemaname tablename tups pages otta tbloat wastedpages wastedbytes wastedsize/}; - my ($index,$irows,$ipages,$iotta,$ibloat,$iwp,$iwb,$iws) = @$r{ - qw/ iname irows ipages iotta ibloat wastedipgaes wastedibytes wastedisize/}; - + 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); next if skip_item($table, $schema); ## Made it past the exclusions @@ -7179,7 +7180,7 @@ sub check_archive_ready { B<check_postgres.pl> - a Postgres monitoring script for Nagios, MRTG, Cacti, and others -This documents describes check_postgres.pl version 2.15.1 +This documents describes check_postgres.pl version 2.15.2 =head1 SYNOPSIS |