1 #############################################################
2 # script to watch for cores during QA runs, so they won't overwrite one
4 # Not activated for efficiency reasons, and problems on MKS, us
5 # only when needed and remember to remove afterwards
6 #############################################################
8 #############################################################
9 # to activate put the following into all.sh (after the HOSTDIR
11 #############################################################
12 # sh `dirname $0`/core_watch $HOSTDIR ${HOSTDIR} &
14 # if [ -n "${KILLPIDS}" ]
16 # echo $CORE_WATCH_PID >>"${KILLPIDS}"
18 #############################################################
20 #############################################################
21 # or put the following into nssqa to watch the whole RESULTDIR
22 # start it shortly before run_all
24 # NOTE: the more efficient way is above, this is potentially going
25 # thru 1000ds of files every 30 seconds
26 #############################################################
27 # sh `dirname $0`/core_watch $RESULTDIR &
28 # echo $! >>"${KILLPIDS}" #so Exit() can hopefully kill the core_watch
29 #############################################################
31 # in both cases remember to kill the process when done, since
32 # the PIDs that end up in ${KILLPIDS} might not work for all OS
33 # something like "kill_by_name core_watch
35 echo $$ >>"${KILLPIDS}" #so Exit() can hopefully kill this shell
38 for w in `find $1 -name "core" -print`
41 mv $w $w.`date +%H%M%S`