Kill tomcat processes including fake death

ID=`ps -ef | grep java | grep apache-tomcat-6.0.35|awk '{print $2}'`
echo $ID
echo "------start---------"
for id in $ID
do
kill -9 $id
echo "killed$id"
done
echo "------end---------"

 

Note:

ID = `ps -ef | grep java | grep apache-tomcat-6.0.35 | awk '{print $ 2}'` is changed to the instruction of the own server to check the tomcat process

 

 


[Java interview questions and answers] sorting recommendations

 

Published 562 original articles · praised 1543 · 1.65 million views +

Guess you like

Origin blog.csdn.net/meism5/article/details/105547883