summaryrefslogtreecommitdiff
path: root/check_postgres.pl
diff options
context:
space:
mode:
authorGreg Sabino Mullane2009-08-23 13:48:59 +0000
committerGreg Sabino Mullane2009-08-23 13:48:59 +0000
commita216496c35fa3ecbdb79198cc07e282a9fb3a5cd (patch)
tree909c74b43775bc6da5e80aa05dc1786576d752eb /check_postgres.pl
parentd742593f6cb7d85a5310c747d6d32446ecfe0b1a (diff)
Remove unused code for now.
Diffstat (limited to 'check_postgres.pl')
-rwxr-xr-xcheck_postgres.pl17
1 files changed, 1 insertions, 16 deletions
diff --git a/check_postgres.pl b/check_postgres.pl
index c141a43a5..92e0ca0c0 100755
--- a/check_postgres.pl
+++ b/check_postgres.pl
@@ -1998,21 +1998,6 @@ sub size_in_bytes { ## no critic (RequireArgUnpacking)
} ## end of size_in_bytes
-sub bytes_in_size {
-
- ## Given a number in bytes and a unit, return the number in the unit.
- ## Defaults to bytes
-
- my ($val,$unit) = ($_[0],lc substr($_[1]||'s',0,1));
- $val=0 if (!$val);
- return sprintf("%.3f", $val / ($unit eq 'b' ? 1 : $unit eq 'k' ? 1024 : $unit eq 'm' ? 1024**2 :
- $unit eq 'g' ? 1024**3 : $unit eq 't' ? 1024**4 :
- $unit eq 'p' ? 1024**5 : $unit eq 'e' ? 1024**6 :
- $unit eq 'z' ? 1024**7 : 1));
-
-} ## end of bytes_in_size
-
-
sub size_in_seconds {
my ($string,$type) = @_;
@@ -3870,7 +3855,7 @@ sub check_query_time {
}
$db->{perf} .= "maxtime=$max;";
$db->{perf} .= "$warning" if length $warning;
- $db->{perf} .= ";";
+ $db->{perf} .= ';';
$db->{perf} .= "$critical" if length $critical;
my $msg = msg('qtime-msg', $max);