]> git.sur5r.net Git - bacula/bacula/blobdiff - regress/scripts/check_for_zombie_jobs
regress: Add cleanup/start/stop functions to functions.pm
[bacula/bacula] / regress / scripts / check_for_zombie_jobs
index b1f689ee202d98410659b1ef2c71cfd3c8552c40..e2c240565b090c0b1912658a3f037680cd4edbda 100755 (executable)
@@ -4,82 +4,85 @@
 # Also scan logs for ERROR messages
 #
 
-. ./config         
+. ./config
 
 # check_for_zombie_jobs storage=STORAGE [client=localhost-fd]
 
 if [ $# = 2 ] ; then
     client="$2"
 else 
-    client=${HOST}-fd
+    client="client"
 fi
 
-bin/bconsole -c bin/bconsole.conf <<END_OF_DATA 2>&1 >/dev/null
-@output tmp/dir.out
+${bin}/bconsole -c ${scripts}/bconsole.conf <<END_OF_DATA 2>&1 >/dev/null
+@output ${tmp}/dir.out
 status dir
-@output tmp/fd.out
-status client=${client}
-@output tmp/sd.out
+@output ${tmp}/fd.out
+status ${client}
+@output ${tmp}/sd.out
 status $1
 @output
 quit
 END_OF_DATA
 
 export zstat
-grep "No Jobs running." tmp/dir.out 2>&1 >/dev/null
+grep "No Jobs running." ${tmp}/dir.out 2>&1 >/dev/null
 if [ $? != 0 ] ; then
   echo " "
   echo "  !!!! Zombie Jobs in Director !!!!"
   echo "  !!!! Zombie Jobs in Director !!!!" >>test.out
+  cat ${tmp}/dir.out
   echo " "
   zstat=1
   exit 1
 fi
-grep "No Jobs running." tmp/fd.out 2>&1 >/dev/null
+grep "No Jobs running." ${tmp}/fd.out 2>&1 >/dev/null
 if [ $? != 0 ] ; then
   echo " "
   echo "  !!!! Zombie Jobs in File daemon !!!!"
   echo "  !!!! Zombie Jobs in File daemon !!!!" >>test.out
+  cat ${tmp}/fd.out
   echo " "
   zstat=1
   exit 1
 fi
-grep "No Jobs running." tmp/sd.out 2>&1 >/dev/null
+grep "No Jobs running." ${tmp}/sd.out 2>&1 >/dev/null
 if [ $? != 0 ] ; then
   echo " "
   echo "  !!!! Zombie Jobs in Storage daemon !!!!"
   echo "  !!!! Zombie Jobs in Storage daemon !!!!" >>test.out
+  cat ${tmp}/sd.out
   echo " "
   zstat=1
   exit 1
 fi
-grep "ERROR" tmp/log*.out 2>&1 >/dev/null
+grep "ERROR" ${tmp}/log*.out 2>&1 >/dev/null
 if [ $? = 0 ] ; then
   echo " "
   echo "  !!!! ERROR in log output !!!!"
   echo "  !!!! ERROR in log output !!!!" >>test.out
-  grep "ERROR" tmp/log*.out
+  grep "ERROR" ${tmp}/log*.out
   echo " "
   zstat=1
   exit 1
 fi
-grep "Fatal Error" tmp/log*.out 2>&1 >/dev/null
+grep "Fatal Error" ${tmp}/log*.out 2>&1 >/dev/null
 if [ $? = 0 ] ; then
   echo " "
   echo "  !!!! Fatal Error in log output !!!!"
   echo "  !!!! Fatal Error in log output !!!!" >>test.out
-  grep "Fatal Error" tmp/log*.out
+  grep "Fatal Error" ${tmp}/log*.out
   echo " "
   zstat=1
   exit 1
 fi
 
-grep "glibc detected" tmp/log*.out 2>&1 >/dev/null
+grep "glibc detected" ${tmp}/log*.out 2>&1 >/dev/null
 if [ $? = 0 ] ; then
   echo " "
   echo "  !!!! glibc detected Error in log output !!!!"
   echo "  !!!! glibc detected Error in log output !!!!" >>test.out
-  grep "glibc detected" tmp/log*.out
+  grep "glibc detected" ${tmp}/log*.out
   echo " "
   zstat=1
   exit 1