#!/bin/tcsh -f #(ie run the tshell on this but don't read the .cshrc or .tcshrc) echo version = 1.00 of killevj 2005 Jul 8 # 2005 Jul 8, 1.00: origin # This is a script to locate and kill the java virtual machine # when it has been hung by evj # this is the ps program: set ps = /bin/ps # identify the process line: set process = `$ps -eo user,pid,args|grep "java_vm"|grep -v grep` echo process line: echo $process set pid = `echo $process|tr ' ' '\n'|tail -2|head -1` echo process id number: $pid echo kill -9 $pid kill -9 $pid