Results 1 to 2 of 2
2 java process running on pc, i need to kill those java processes and after kill all java process i need to start it, this script should run as cronjob. ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 12-13-2012 #1
- Join Date
- Sep 2012
write script for kill process
2 java process running on pc, i need to kill those java processes and after kill all java process i need to start it, this script should run as cronjob.
as a function, i used
i take java count from this
jvcount=$(ps -e|grep java |wc -l)
if it is equal to 2
then need to kill java node 1 like following
kill -term `/sbin/pidof java_n1`
then, if java count qual to 1 then need to kill java node 2 as following
kill -term `/sbin/pidof java_n2`
then java count is equal to 0 need to start them again,
that part i can do, if you guys can help pleas let me know how to do it.
- 12-13-2012 #2
- Join Date
- May 2004
- arch linux
you'll probably get better exposure for this help request if you use the report button (lower-left corner of your post) to ask one of the mods to move it to the programming/scripting forum
edit: okay, it looks like one of them has moved it for you!
Last edited by oz; 12-13-2012 at 04:51 PM.oz