From: Russ Allbery Date: Thu, 25 Mar 2004 06:52:06 +0000 (+0000) Subject: Check for vos partinfo failing. X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=4ce2ae5980b93f14d87c9ff46925c0003d5b577e;p=packages%2Fa%2Fafs-monitor.git Check for vos partinfo failing. --- diff --git a/check_afsspace b/check_afsspace index b4df9c8..0dc55dc 100755 --- a/check_afsspace +++ b/check_afsspace @@ -88,6 +88,10 @@ alarm ($TIMEOUT); # @warnings. Accumulate all percentages in @all. my (@critical, @warnings, @all); my @data = `$VOS partinfo '$host' 2> /dev/null`; +if ($? != 0) { + print "AFS CRITICAL: cannot contact server\n"; + exit 2; +} for (@data) { my ($partition, $free, $total) = (split)[4,5,11]; my $percent = int ((($total - $free) / $total) * 100);