shell script for kill program and start progran
guy i need a help to write bash script to kill program. we are running jboss nodes, when i run ps -e|grep java then it show all running jave node with pid as 1234 java_n1 (this can be run java_n1,n2,n3...nn),
i want write script to identify how many nodes are running and kill them one by one using their pid number as "kill -9 1234". after kill them all need to check whether there are still java nodes are running, if not start previous available nodes after few seconds, ex- before kill the java process there was 10 node, after kill we have to start same 10 nodes.
please help me to write this.
|