[TD-3326]<test>backup taos after taos coredump

This commit is contained in:
liuyq-617 2021-03-16 16:10:54 +08:00
parent 10da4abaf6
commit 3f8e90670f
1 changed files with 7 additions and 4 deletions

View File

@ -24,11 +24,14 @@ function stopTaosd {
function dohavecore(){ function dohavecore(){
corefile=`find $corepath -mmin 1` corefile=`find $corepath -mmin 1`
proc=`echo $corefile|cut -d "_" -f2`
if [ -n "$corefile" ];then if [ -n "$corefile" ];then
echo 'taosd or taos has generated core' echo 'taosd or taos has generated core'
if [[ $1 == 1 ]];then echo '\n'|gdb /usr/local/taos/bin/$proc $corepath/$corefile -ex "bt 10" -ex quit
exit 8 tar zcvf $corepath/taos_`date "+%Y_%m_%d_%H:%M:%S"`.tar.gz /usr/local/taos
fi if [[ $1 == 1 ]];then
exit 8
fi
fi fi
} }
function runSimCaseOneByOne { function runSimCaseOneByOne {