How to Check the process Status and do something

Hi we have weblogic deployed under Linux Enterprise 5 .

Now i want to write a script that checks if weblogic is running or not

I have found that weblogic uses Java as process .
Can i do this way :
my Script File :

Echo Checking Status 

if [ps -ef | grep java ]
then
echo Server Running
else
echo Server Not  Running Do Something 
fi



Please correct me if i am wrong .

I would think other things probably use java as well, is there a specific process tied to weblogic?

Yes you are right . not sure so posted this question in forum . I will post this in Weblogic forum also and update the status here .