I am running AIX 5.1.3 We have a product that has a startup but no shutdown the only way to stop it is to kill the PID ...I need to have this set to stop automatic . How would I write my script to kill this job ....
This is what I have used in the past. It was used in some WebSphere development when the only way to shutdown WebSphere if you weren't on the WebSphere console was to kill all the java processes.
Syntax for executing the script is:
myscript.sh <process>
# This line gets the process number for the value passed in the
# command (java, for WebSphere) and writes the PID only to
# a text file.
# This line cats the file created in the line above and says while
# catting the file, read each line.
cat /home/utility/bin/pid.txt | while read LINE
# This line tells the system to do a kill -9 on each PID that is
# listed in the pid.txt file. There may be an error message
# because the grep for the process is also listed but by the time
# the kill command is executed, the grep has already died.
do kill -9 $LINE
# This line closes up the do line.
done
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.