From 59245016197d195de23258fc32e4194ef366e07b Mon Sep 17 00:00:00 2001 From: Greg Sabino Mullane Date: Mon, 27 Dec 2010 18:33:35 -0500 Subject: [PATCH] Better formatting of sizes in "bloat" action. --- check_postgres.pl | 15 ++++++++------- 1 file 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 - 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 -- 2.30.2