# and ask that server to resolve it's own name. If it can do that, then we
# assume it is ok - If it can't then something is wrong.
-# $Id: check_dns,v 1.2 2000/09/13 18:20:36 sljohnson Exp $
+# $Id: check_dns,v 1.3 2001/08/07 18:41:05 sljohnson Exp $
sub check_dns {
my( $host ) = @_;
"queries.\n" );
}
-
- system($cmd);
+ safe_exec($cmd,15);
if ( ($? >> 8) == 0 ) {
$color = "green";
# the portmapper at the remote host. It checks to make sure the nfs, and
# mountd services are responding.
+# $Id: check_nfs,v 1.2 2001/08/07 18:41:05 sljohnson Exp $
+
+use Spong::SafeExec qw(safe_exec);
+
sub check_nfs {
my( $host ) = @_;
my( $color, $summary, $message, $rpcok ) = ( "green", "", "", 1 );
my( $msg1, $msg2 );
- $msg1 = `$RPCINFO $host nfs 2>&1`;
+ $msg1 = safe_exec("$RPCINFO $host nfs 2>&1",30);
if( $msg1 !~ /ready and waiting/ ) { $rpcok = 0; }
- $msg2 = `$RPCINFO $host mountd 2>&1`;
+ $msg2 = safe_exec("$RPCINFO $host mountd 2>&1",30);
if( $msg2 !~ /ready and waiting/ ) { $rpcok = 0; }
$message = "$msg1\n$msg2";
# second, it is a yellow status. If the host is not synchonized, it is red
# status
+# $Id: check_ntp,v 1.5 2001/08/07 18:41:05 sljohnson Exp $
+
use Spong::SafeExec qw(safe_exec);
sub check_ntp {