Operating System - Linux
1819928 Members
3055 Online
109607 Solutions
New Discussion юеВ

Check Websphere is running or not

 
bruceedgar
Occasional Advisor

Check Websphere is running or not

Hi ,

I have installed Websphere applcation server in my box, i would like to check that the Websphere application server is running or not.

Thanks in Advance

Bruce
5 REPLIES 5
Patrick Wallek
Honored Contributor

Re: Check Websphere is running or not

Websphere itself should have a command that tells whether or not it is running. If nothing else, there should be a list or processes that Websphere runs. If you know the process name, you can check for the existence of that process with the 'ps' command. Do a 'man ps' for information on the usage of 'ps'.
James R. Ferguson
Acclaimed Contributor

Re: Check Websphere is running or not

Hi Bruce:

# [ -z "`UNIX95= ps -C myproc -o pid= -o comm=`" ] && mailx -s "myproc" is not running!" root < /dev/null

Substitute the 'basename' of the Websphere process for 'myproc' and you have a monitor that can be 'cron'ed if you like to alert you (here, the root user) when the process isn't running.

Regards!

...JRF...
Heironimus
Honored Contributor

Re: Check Websphere is running or not

Use "$WAS_HOME/bin/serverStatus.sh -all" to see what's running. It's slow, but it does query the server(s) to make sure they're responding.

A faster way is to check the processes, but you have to be careful because java processes all look pretty much the same. You'll get a PID file in each server's log directory (ie logs/server1/server1.pid), you can try to make sure the listed PID is valid and looks like a WebSphere process.
bruceedgar
Occasional Advisor

Re: Check Websphere is running or not

Hi,


Actually im a normal user i dont have permission to run serverstatus.sh , Can you suggest some other ways to find the process which are must to run Websphere so that we can find them using PS if they are not running.

Thanks
Heironimus
Honored Contributor

Re: Check Websphere is running or not

Use the PID file and see if it's a java process running from the WebSphere installation path. Depending on your setup, WebSphere may have several processes. You probably won't be able to tell different WebSphere processes apart with ps on HP-UX because the command is long enough to get truncated.

If you can not run serverStatus.sh then I assume you are not the WebSphere admin. The application admins may be able to provide you with better information on identifying WebSphere processes in that specific environment.