Hi,
I want to know if I can check the status of weblogic(whether its running or down) dynamically thru a C program or some script. And once I have found that that the server is down, can I restart it dynamically from the same program.
Thanks,
Amber
You could try something like this (I presume you're using unix)
#!/bin/sh
ps -ef | grep -v "grep weblogic.Server"|grep weblogic.Server
if [ $? -ne 0 ]
then
./startWebLogic.sh
fi
The ps should return false if it can't find a process containing "weblogic.Server".
This script should be put in your weblogic root installation dir. It obviously will be thrown off if your system has more than one process open that contains the string 'weblogic.Server', but I'm not sure why that would happen (unless you are running multiple instances on the same machine)
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.