I have two questions and I am spending the whole day trying to figure
it out and decided to ask the expert.
1) My eval [eval $countRMI1098 -lt 3 ] does not work. Could you tell
me where I have to change. I search the deja.com but I don't see any
related subject.
2) I have cmrstart1098 file that I want to call in my korn shell
script. How could I do that? The cmrstart would have this command -
nohup rmiregistry 1098 > cmrlog1098.txt&
Thank for you help
Joe
#!/bin/ksh
countRMI1098=`ps -ef | grep -v grep | grep 1098 | wc`
messageJavaCoreDump="BOOGUS ! Just a test only.\n Java Application
has a Core Dump.\nPlease restart all RMIs"
messageRMI1098="BOOGUS ! Just a test only.\nCMR 1098 RMIs were down
and have been restarted.\n"
if [ eval $countRMI1098 -lt 3 ]
then
ps -ef | grep -v grep | grep 1098 | awk '{print $2}' | xargs
kill
cmrstart1098
echo messageRMI1098 | mail -s"RMI 1098 Restarted" $notifyCMR
else
echo messageRMI1098 | mail -s"Everything is Okay" $notifyCMR
fi