Friday, July 8, 2016

Force shutdown/Kill WSO2 Servers running in a Linux environment

In Linux there are multiple ways to force shutdown/kill all the process of a certain type. If we want to force shutdown all the WSO2 Servers that are running on a particular node, we can easily execute the following command.
killall java
The problem with the above command is that it will force shutdown all the java process running on that node which are not WSO2 specific.

The following command can be used to force shutdown or kill all the WSO2 servers that are running on a particular node and leave the other Java process intact.

ps -ef | egrep 'wso2' | mawk '{print($2)}' | xargs kill -9

No comments:

Post a Comment