📅  最后修改于: 2022-03-11 15:00:33.298000             🧑  作者: Mango
#Finds the tomcat process id
ps aux | grep tomcat | grep JavaVirtualMachines | awk -F " " '{print $2}' > tomcatProcessID
#Kills the process id returned from above mentioned command.
kill -9 `cat tomcatProcessID` && tput setaf 3 && echo "Tomcat killed Successfully" ;rm -rf tomcatProcessID
#Not a mandatory command.
#Used to show all the remaining processes with 'tomcat' keyword in it.
#To inform on the console that the tomcat (running ess or indexer) is killed.
ps aux | grep tomcat | grep -v grep | grep -v killtomcat