]> git.sur5r.net Git - bacula/bacula/blob - regress/scripts/check_for_zombie_jobs
regress: Add update_win32 function to win32-fd-test
[bacula/bacula] / regress / scripts / check_for_zombie_jobs
1 #!/bin/sh
2 #
3 # Check for zombie jobs (not terminated).
4 # Also scan logs for ERROR messages
5 #
6
7 . ./config
8
9 # check_for_zombie_jobs storage=STORAGE [client=localhost-fd]
10
11 if [ $# = 2 ] ; then
12     client="$2"
13 else 
14     client="client"
15 fi
16
17 ${bin}/bconsole -c ${scripts}/bconsole.conf <<END_OF_DATA 2>&1 >/dev/null
18 @output ${tmp}/dir.out
19 status dir
20 @output ${tmp}/fd.out
21 status ${client}
22 @output ${tmp}/sd.out
23 status $1
24 @output
25 quit
26 END_OF_DATA
27
28 export zstat
29 grep "No Jobs running." ${tmp}/dir.out 2>&1 >/dev/null
30 if [ $? != 0 ] ; then
31   echo " "
32   echo "  !!!! Zombie Jobs in Director !!!!"
33   echo "  !!!! Zombie Jobs in Director !!!!" >>test.out
34   cat ${tmp}/dir.out
35   echo " "
36   zstat=1
37   exit 1
38 fi
39 grep "No Jobs running." ${tmp}/fd.out 2>&1 >/dev/null
40 if [ $? != 0 ] ; then
41   echo " "
42   echo "  !!!! Zombie Jobs in File daemon !!!!"
43   echo "  !!!! Zombie Jobs in File daemon !!!!" >>test.out
44   cat ${tmp}/fd.out
45   echo " "
46   zstat=1
47   exit 1
48 fi
49 grep "No Jobs running." ${tmp}/sd.out 2>&1 >/dev/null
50 if [ $? != 0 ] ; then
51   echo " "
52   echo "  !!!! Zombie Jobs in Storage daemon !!!!"
53   echo "  !!!! Zombie Jobs in Storage daemon !!!!" >>test.out
54   cat ${tmp}/sd.out
55   echo " "
56   zstat=1
57   exit 1
58 fi
59 grep "ERROR" ${tmp}/log*.out 2>&1 >/dev/null
60 if [ $? = 0 ] ; then
61   echo " "
62   echo "  !!!! ERROR in log output !!!!"
63   echo "  !!!! ERROR in log output !!!!" >>test.out
64   grep "ERROR" ${tmp}/log*.out
65   echo " "
66   zstat=1
67   exit 1
68 fi
69 grep "Fatal Error" ${tmp}/log*.out 2>&1 >/dev/null
70 if [ $? = 0 ] ; then
71   echo " "
72   echo "  !!!! Fatal Error in log output !!!!"
73   echo "  !!!! Fatal Error in log output !!!!" >>test.out
74   grep "Fatal Error" ${tmp}/log*.out
75   echo " "
76   zstat=1
77   exit 1
78 fi
79
80 grep "glibc detected" ${tmp}/log*.out 2>&1 >/dev/null
81 if [ $? = 0 ] ; then
82   echo " "
83   echo "  !!!! glibc detected Error in log output !!!!"
84   echo "  !!!! glibc detected Error in log output !!!!" >>test.out
85   grep "glibc detected" ${tmp}/log*.out
86   echo " "
87   zstat=1
88   exit 1
89 fi