Skip to content

Commit 5924501

Browse files
author
Greg Sabino Mullane
committed
Better formatting of sizes in "bloat" action.
1 parent dfd300e commit 5924501

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

check_postgres.pl

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ package check_postgres;
3030
$Data::Dumper::Indent = 2;
3131
$Data::Dumper::Useqq = 1;
3232

33-
our $VERSION = '2.15.1';
33+
our $VERSION = '2.15.2';
3434

3535
use vars qw/ %opt $PSQL $res $COM $SQL $db /;
3636

@@ -2844,11 +2844,12 @@ sub check_bloat {
28442844

28452845
for my $r (@{$db->{slurp}}) {
28462846

2847-
my ($dbname,$schema,$table,$tups,$pages,$otta,$bloat,$wp,$wb,$ws) = @$r{
2848-
qw/ db schemaname tablename tups pages otta tbloat wastedpages wastedbytes wastedsize/};
2849-
my ($index,$irows,$ipages,$iotta,$ibloat,$iwp,$iwb,$iws) = @$r{
2850-
qw/ iname irows ipages iotta ibloat wastedipgaes wastedibytes wastedisize/};
2851-
2847+
my ($dbname,$schema,$table,$tups,$pages,$otta,$bloat,$wp,$wb) = @$r{
2848+
qw/ db schemaname tablename tups pages otta tbloat wastedpages wastedbytes/};
2849+
my $ws = pretty_size($wb);
2850+
my ($index,$irows,$ipages,$iotta,$ibloat,$iwp,$iwb) = @$r{
2851+
qw/ iname irows ipages iotta ibloat wastedipgaes wastedibytes/};
2852+
my $iws = pretty_size($iwb);
28522853
next if skip_item($table, $schema);
28532854

28542855
## Made it past the exclusions
@@ -7179,7 +7180,7 @@ =head1 NAME
71797180
71807181
B<check_postgres.pl> - a Postgres monitoring script for Nagios, MRTG, Cacti, and others
71817182
7182-
This documents describes check_postgres.pl version 2.15.1
7183+
This documents describes check_postgres.pl version 2.15.2
71837184
71847185
=head1 SYNOPSIS
71857186

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy