Better formatting of sizes in "bloat" action. 2.15.0
authorGreg Sabino Mullane <[email protected]>
Mon, 27 Dec 2010 23:33:35 +0000 (18:33 -0500)
committerGreg Sabino Mullane <[email protected]>
Mon, 27 Dec 2010 23:33:35 +0000 (18:33 -0500)
check_postgres.pl

index 2d86e452f0cec6cbe9bb6ad9fccf1f0d0f9e7d9d..965df8b4a35ecb02f1b6064750ea7854f8e45852 100755 (executable)
@@ -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