summaryrefslogtreecommitdiff
path: root/check_postgres.pl
diff options
context:
space:
mode:
authorGreg Sabino Mullane2015-05-27 02:02:30 +0000
committerGreg Sabino Mullane2015-05-27 02:02:30 +0000
commit4cea93ea51fceb532c4b07b70c18eeb412aaeed7 (patch)
tree86f44048e9ea9f424a87aed054a3e613d404ef78 /check_postgres.pl
parentda35d417cabd4585cd2db1d00b78e07e31cf43e6 (diff)
Remove tabs, cleanup whitespace
Diffstat (limited to 'check_postgres.pl')
-rwxr-xr-xcheck_postgres.pl12
1 files changed, 6 insertions, 6 deletions
diff --git a/check_postgres.pl b/check_postgres.pl
index f8da6b8aa..a7a2a7679 100755
--- a/check_postgres.pl
+++ b/check_postgres.pl
@@ -2254,10 +2254,10 @@ sub run_command {
if ($arg->{dbnumber} and $arg->{dbnumber} != $num) {
next;
}
- ## Likewise if we have specified "target" database info and this is not our choice
- if ($arg->{target} and $arg->{target} != $db) {
+ ## Likewise if we have specified "target" database info and this is not our choice
+ if ($arg->{target} and $arg->{target} != $db) {
next;
- }
+ }
## Just to keep things clean:
truncate $tempfh, 0;
@@ -7295,9 +7295,9 @@ FROM (
FROM $seqname) foo
};
}
- # Use UNION ALL to query multiple sequences at once, however if there are too many sequences this can exceed
+ # Use UNION ALL to query multiple sequences at once, however if there are too many sequences this can exceed
# maximum argument length; so split into chunks of 200 sequences or less and iterate over them.
- while (my @seq_sql_chunk = splice @seq_sql, 0, 200) {
+ while (my @seq_sql_chunk = splice @seq_sql, 0, 200) {
my $seqinfo = run_command(join("\nUNION ALL\n", @seq_sql_chunk), { target => $db }); # execute all SQL commands at once
for my $r2 (@{$seqinfo->{db}[0]{slurp}}) { # now look at all results
my ($seqname, $last, $slots, $used, $percent, $left) = @$r2{qw/ seqname last_value slots used percent numleft / };
@@ -7322,7 +7322,7 @@ FROM $seqname) foo
push @warn => $msg;
}
}
- }
+ }
if ($MRTG) {
my $msg = join ' | ' => map { $_->[0] } @{$seqinfo{$maxp}};
do_mrtg({one => $maxp, msg => $msg});