projects
/
check_postgres.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f22f65e
)
Fix bad sort key in check_disk_space.
author
Greg Sabino Mullane
<
[email protected]
>
Mon, 28 Jul 2008 23:37:16 +0000
(19:37 -0400)
committer
Greg Sabino Mullane
<
[email protected]
>
Mon, 28 Jul 2008 23:37:16 +0000
(19:37 -0400)
check_postgres.pl
patch
|
blob
|
blame
|
history
diff --git
a/check_postgres.pl
b/check_postgres.pl
index 55fc0b50d8064a57802b7d1f55fa02753714e0e0..e84aea700ae882901e8de03a63bddda26980b403 100755
(executable)
--- a/
check_postgres.pl
+++ b/
check_postgres.pl
@@
-1986,7
+1986,7
@@
sub check_disk_space {
: $opt{mrtg} eq 'avail' ? 2
: $opt{mrtg} eq 'percent' ? 3 : 2 : 2;
my ($one,$two,$msg) = ('','','');
- for (sort { $
b->[$sortby] <=> $a
->[$sortby] } keys %stats) {
+ for (sort { $
stats{$b}->[$sortby] <=> $stats{$a}
->[$sortby] } keys %stats) {
if ($one eq '') {
$one = $stats{$_}->[$sortby];
$msg = $_;