| Author |
checking Weblogic status in Weblogic UNIX/Linux
|
Ravi Kiran Va
Ranch Hand
Joined: Apr 18, 2009
Posts: 2234
|
|
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 :
Please correct me if i am wrong .I am posting here because there are other process that uses Java as their process status.
|
Save India From Corruption - Anna Hazare.
|
 |
Deepak Bala
Bartender
Joined: Feb 24, 2006
Posts: 6603
|
|
|
Why not hit an application URL and check if the server is up ? Netcat can do that for you
|
SCJP 6 articles - SCJP 5/6 mock exams - SCJP Mocks - SCJP 5 Mock exam (Word document ) - SCJP 5 Mock exam in Java.Inquisition format
|
 |
Joe Ess
Bartender
Joined: Oct 29, 2001
Posts: 8290
|
|
Deepak's suggestion is a good one. We use a commercial product, IP Monitor, to keep tabs on our server's external interfaces. To check the server process, I start the server with a bogus system property (this code is actually in startWebLogic.sh):
This is on a Solaris system, so to get the command line for a process we run:
and then we grep through that output to find "admin_server".
|
"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
|
 |
Ravi Kiran Va
Ranch Hand
Joined: Apr 18, 2009
Posts: 2234
|
|
Deepak Bala wrote:Why not hit an application URL and check if the server is up ? Netcat can do that for you
Hi thanks all for replying ,
First of all sorry as i am not clear in my first post of this Thread.
My requirement is that i am using unix crontab for job scheduling that checks or runs this script for every 30 minutes .
So i need to dynamically check .
Any suggestions .
|
 |
Deepak Bala
Bartender
Joined: Feb 24, 2006
Posts: 6603
|
|
|
The solutions mentioned here can work with cron tab and make the checks dynamically. What part of the requirement is not met yet ?
|
 |
Andreas Barrud
Greenhorn
Joined: Jun 11, 2009
Posts: 12
|
|
If you would start the WLS with a command line like:
java -server -Dweblogic.Name=TheOne -Xms700m -Xmx750......
you can easily grep for "TheOne".
If you have a lot of managed Servers, and you use a naming scheme like: [prefix][number][number] (for example prod10) you could use a script like that (tested on Solaris with WLS 10.3):
|
 |
 |
|
|
subject: checking Weblogic status in Weblogic UNIX/Linux
|
|
|