From 54413384626f8eaa82b6204f8c8b9dd128940a02 Mon Sep 17 00:00:00 2001 From: Greg Sabino Mullane Date: Tue, 21 Oct 2008 23:53:53 -0400 Subject: [PATCH] Don't show totaltime if not available. --- check_postgres.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/check_postgres.pl b/check_postgres.pl index 629de5bed..9c6b4537d 100755 --- a/check_postgres.pl +++ b/check_postgres.pl @@ -354,7 +354,7 @@ sub add_response { $db->{host} eq '' ? '' : qq{(host:$db->{host}) }, $db->{port} eq $DEF_PGPORT ? '' : qq{(port=$db->{port}) }; $header =~ s/\s+$//; - my $perf = $opt{showtime} ? "time=$db->{totaltime}" : ''; + my $perf = ($opt{showtime} and $db->{totaltime}) ? "time=$db->{totaltime}" : ''; if ($db->{perf}) { $perf .= " $db->{perf}"; } -- 2.39.5