Wednesday, October 2, 2013

Force Stop server using Script

You have scripts to stop / start servers and sometimes due to memory leak or other reasons the server just doesn't shutdown .  Script doesn't work because of this.

Work around ? , is to kill the process .  

for tomcat

ps xu | grep 'tomcat' | grep -v grep | awk '{ print $2 }' | xargs kill -9

for jboss , you can use 'Standalone' keyword if you are using jboss7 or try to find the unique name from the process description

ps xu | grep 'Standalone' | grep -v grep | awk '{ print $2 }' | xargs kill -9

No comments: