refine killing exist daemon.
This commit is contained in:
parent
8de5e86d76
commit
7f4742ba97
|
@ -12,6 +12,7 @@ python3 ./test.py $1 -f insert/binary.py
|
||||||
python3 ./test.py $1 -f insert/nchar.py
|
python3 ./test.py $1 -f insert/nchar.py
|
||||||
python3 ./test.py $1 -f insert/nchar-boundary.py
|
python3 ./test.py $1 -f insert/nchar-boundary.py
|
||||||
python3 ./test.py $1 -f insert/nchar-unicode.py
|
python3 ./test.py $1 -f insert/nchar-unicode.py
|
||||||
|
python3 ./test.py $1 -f insert/multi.py
|
||||||
|
|
||||||
python3 ./test.py $1 -f table/column_name.py
|
python3 ./test.py $1 -f table/column_name.py
|
||||||
python3 ./test.py $1 -f table/column_num.py
|
python3 ./test.py $1 -f table/column_num.py
|
||||||
|
|
|
@ -21,6 +21,8 @@ python3 ./test.py $1 -f insert/date.py
|
||||||
python3 ./test.py $1 -s && sleep 1
|
python3 ./test.py $1 -s && sleep 1
|
||||||
python3 ./test.py $1 -f insert/nchar.py
|
python3 ./test.py $1 -f insert/nchar.py
|
||||||
python3 ./test.py $1 -s && sleep 1
|
python3 ./test.py $1 -s && sleep 1
|
||||||
|
python3 ./test.py $1 -f insert/multi.py
|
||||||
|
python3 ./test.py $1 -s && sleep 1
|
||||||
|
|
||||||
python3 ./test.py $1 -f table/column_name.py
|
python3 ./test.py $1 -f table/column_name.py
|
||||||
python3 ./test.py $1 -s && sleep 1
|
python3 ./test.py $1 -s && sleep 1
|
||||||
|
|
|
@ -233,16 +233,14 @@ class TDDnode:
|
||||||
toBeKilled = "valgrind.bin"
|
toBeKilled = "valgrind.bin"
|
||||||
|
|
||||||
if self.running != 0:
|
if self.running != 0:
|
||||||
killCmd = "ps -ef|grep -w %s| grep '%s' | grep -v grep | awk '{print $2}' | xargs kill -INT" % (
|
|
||||||
toBeKilled, self.cfgDir)
|
|
||||||
|
|
||||||
psCmd = "ps -ef|grep -w %s| grep -v grep | awk '{print $2}'" % toBeKilled
|
psCmd = "ps -ef|grep -w %s| grep -v grep | awk '{print $2}'" % toBeKilled
|
||||||
processID = subprocess.check_output(psCmd, shell=True)
|
processID = subprocess.check_output(psCmd, shell=True).decode("utf-8")
|
||||||
|
|
||||||
while(processID):
|
while(processID):
|
||||||
|
killCmd = "kill -INT %s" % processID
|
||||||
os.system(killCmd)
|
os.system(killCmd)
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
processID = subprocess.check_output(psCmd, shell=True)
|
processID = subprocess.check_output(psCmd, shell=True).decode("utf-8")
|
||||||
|
|
||||||
self.running = 0
|
self.running = 0
|
||||||
tdLog.debug("dnode:%d is stopped by kill -INT" % (self.index))
|
tdLog.debug("dnode:%d is stopped by kill -INT" % (self.index))
|
||||||
|
@ -254,15 +252,14 @@ class TDDnode:
|
||||||
toBeKilled = "valgrind.bin"
|
toBeKilled = "valgrind.bin"
|
||||||
|
|
||||||
if self.running != 0:
|
if self.running != 0:
|
||||||
killCmd = "ps -ef|grep -w %s| grep '%s' | grep -v grep | awk '{print $2}' | xargs kill -KILL" % (
|
|
||||||
toBeKilled, self.cfgDir)
|
|
||||||
psCmd = "ps -ef|grep -w %s| grep -v grep | awk '{print $2}'" % toBeKilled
|
psCmd = "ps -ef|grep -w %s| grep -v grep | awk '{print $2}'" % toBeKilled
|
||||||
processID = subprocess.check_output(psCmd, shell=True)
|
processID = subprocess.check_output(psCmd, shell=True).decode("utf-8")
|
||||||
|
|
||||||
while(processID):
|
while(processID):
|
||||||
|
killCmd = "kill -KILL %s" % processID
|
||||||
os.system(killCmd)
|
os.system(killCmd)
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
processID = subprocess.check_output(psCmd, shell=True)
|
processID = subprocess.check_output(psCmd, shell=True).decode("utf-8")
|
||||||
|
|
||||||
self.running = 0
|
self.running = 0
|
||||||
tdLog.debug("dnode:%d is stopped by kill -KILL" % (self.index))
|
tdLog.debug("dnode:%d is stopped by kill -KILL" % (self.index))
|
||||||
|
@ -307,21 +304,21 @@ class TDDnodes:
|
||||||
self.dnodes.append(TDDnode(10))
|
self.dnodes.append(TDDnode(10))
|
||||||
|
|
||||||
def init(self, path):
|
def init(self, path):
|
||||||
killCmd = "ps -ef|grep -w taosd | grep -v grep | awk '{print $2}' | xargs kill -KILL"
|
|
||||||
psCmd = "ps -ef|grep -w taosd| grep -v grep | awk '{print $2}'"
|
psCmd = "ps -ef|grep -w taosd| grep -v grep | awk '{print $2}'"
|
||||||
processID = subprocess.check_output(psCmd, shell=True)
|
processID = subprocess.check_output(psCmd, shell=True).decode("utf-8")
|
||||||
while(processID):
|
while(processID):
|
||||||
|
killCmd = "kill -KILL %s" % processID
|
||||||
os.system(killCmd)
|
os.system(killCmd)
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
processID = subprocess.check_output(psCmd, shell=True)
|
processID = subprocess.check_output(psCmd, shell=True).decode("utf-8")
|
||||||
|
|
||||||
killCmd = "ps -ef|grep -w valgrind.bin| grep -v grep | awk '{print $2}' | xargs kill -KILL"
|
|
||||||
psCmd = "ps -ef|grep -w valgrind.bin| grep -v grep | awk '{print $2}'"
|
psCmd = "ps -ef|grep -w valgrind.bin| grep -v grep | awk '{print $2}'"
|
||||||
processID = subprocess.check_output(psCmd, shell=True)
|
processID = subprocess.check_output(psCmd, shell=True).decode("utf-8")
|
||||||
while(processID):
|
while(processID):
|
||||||
|
killCmd = "kill -KILL %s" % processID
|
||||||
os.system(killCmd)
|
os.system(killCmd)
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
processID = subprocess.check_output(psCmd, shell=True)
|
processID = subprocess.check_output(psCmd, shell=True).decode("utf-8")
|
||||||
|
|
||||||
binPath = os.path.dirname(os.path.realpath(__file__))
|
binPath = os.path.dirname(os.path.realpath(__file__))
|
||||||
binPath = binPath + "/../../../debug/"
|
binPath = binPath + "/../../../debug/"
|
||||||
|
@ -407,27 +404,27 @@ class TDDnodes:
|
||||||
self.dnodes[i].stop()
|
self.dnodes[i].stop()
|
||||||
|
|
||||||
psCmd = "ps -ef | grep -w taosd | grep 'root' | grep -v grep | awk '{print $2}'"
|
psCmd = "ps -ef | grep -w taosd | grep 'root' | grep -v grep | awk '{print $2}'"
|
||||||
processID = subprocess.check_output(psCmd, shell=True)
|
processID = subprocess.check_output(psCmd, shell=True).decode("utf-8")
|
||||||
if processID:
|
if processID:
|
||||||
cmd = "sudo systemctl stop taosd"
|
cmd = "sudo systemctl stop taosd"
|
||||||
os.system(cmd)
|
os.system(cmd)
|
||||||
# if os.system(cmd) != 0 :
|
# if os.system(cmd) != 0 :
|
||||||
# tdLog.exit(cmd)
|
# tdLog.exit(cmd)
|
||||||
killCmd = "ps -ef|grep -w taosd| grep -v grep | awk '{print $2}' | xargs kill -KILL"
|
|
||||||
psCmd = "ps -ef|grep -w taosd| grep -v grep | awk '{print $2}'"
|
psCmd = "ps -ef|grep -w taosd| grep -v grep | awk '{print $2}'"
|
||||||
processID = subprocess.check_output(psCmd, shell=True)
|
processID = subprocess.check_output(psCmd, shell=True).decode("utf-8")
|
||||||
while(processID):
|
while(processID):
|
||||||
|
killCmd = "kill -KILL %s" % processID
|
||||||
os.system(killCmd)
|
os.system(killCmd)
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
processID = subprocess.check_output(psCmd, shell=True)
|
processID = subprocess.check_output(psCmd, shell=True).decode("utf-8")
|
||||||
|
|
||||||
killCmd = "ps -ef|grep -w valgrind.bin| grep -v grep | awk '{print $2}' | xargs kill -KILL"
|
|
||||||
psCmd = "ps -ef|grep -w valgrind.bin| grep -v grep | awk '{print $2}'"
|
psCmd = "ps -ef|grep -w valgrind.bin| grep -v grep | awk '{print $2}'"
|
||||||
processID = subprocess.check_output(psCmd, shell=True)
|
processID = subprocess.check_output(psCmd, shell=True).decode("utf-8")
|
||||||
while(processID):
|
while(processID):
|
||||||
|
killCmd = "kill -KILL %s" % processID
|
||||||
os.system(killCmd)
|
os.system(killCmd)
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
processID = subprocess.check_output(psCmd, shell=True)
|
processID = subprocess.check_output(psCmd, shell=True).decode("utf-8")
|
||||||
|
|
||||||
# if os.system(cmd) != 0 :
|
# if os.system(cmd) != 0 :
|
||||||
# tdLog.exit(cmd)
|
# tdLog.exit(cmd)
|
||||||
|
|
|
@ -21,6 +21,8 @@ python3 ./test.py $1 -f insert/date.py
|
||||||
python3 ./test.py $1 -s && sleep 1
|
python3 ./test.py $1 -s && sleep 1
|
||||||
python3 ./test.py $1 -f insert/nchar.py
|
python3 ./test.py $1 -f insert/nchar.py
|
||||||
python3 ./test.py $1 -s && sleep 1
|
python3 ./test.py $1 -s && sleep 1
|
||||||
|
python3 ./test.py $1 -f insert/multi.py
|
||||||
|
python3 ./test.py $1 -s && sleep 1
|
||||||
|
|
||||||
python3 ./test.py $1 -f table/column_name.py
|
python3 ./test.py $1 -f table/column_name.py
|
||||||
python3 ./test.py $1 -s && sleep 1
|
python3 ./test.py $1 -s && sleep 1
|
||||||
|
|
Loading…
Reference in New Issue