python 杀死以前启动的进程

if __name__ == '__main__':

228         cmd="ps -A -opid,stime,etime,args | grep python | grep -v grep | grep "+sys.argv[0]+"|sort -n  -

    k 3|sed '$d'| awk '{print $1}' | xargs kill -9"

229         print "cmd:",cmd

230         p= os.popen(cmd).readlines()

231         print p

232         start()

233         #hiveexe("select * from log.channelnews where p_hour='2014102917' limit 5")

234         while True:

235                 time.sleep(10000)


你可能感兴趣的:(python 杀死以前启动的进程)