Link to home
Start Free TrialLog in
Avatar of chaitu chaitu
chaitu chaituFlag for India

asked on

How do i know server process id for websphere in linux?

i have 2 profiles in websphere;for these 2 profiles i want to know the process id(server.pid) in linux.
Avatar of nedvis
nedvis
Flag of United States of America image

I'm not  a developer nor familiar with Websphere but I came accross this IBM document: which
may help you:

http://tinyurl.com/2utgsc
From inside of websphere or just from a unix command prompt?  From a command prompt you could "pgrep -l websphere".
Avatar of j_steenkamp
j_steenkamp

First of all, please be more specific. Which release of Websphere? I assume 6.0 or 6.1 , because you mention profiles. Which version? i.e. express or network deployment edition.

A profile itself has no id because the profile isn't an application server. Inside your profile your can have many application servers. Those will have process id's.

ps -auxwww | grep java will do on solaris and aix.

like arrkerr1024 mentioned; inside the ibm administration (web) console you are able to see the process number.

Third option. On the filesystem you will have a pid file in the base log directory of your application server.
As j_steenkamp mentioned, the pid file on the filesystem is the BEST way to find the pid.

If you just "pgrep -l java" you're not only going to get websphere, but you're also going to get any other java programs - maybe you also run tomcat, maybe some monitoring program, etc...  don't do it.  Even if you aren't now, someone may start one in a year and confuse the whole process.  Not only that, but you'd then have to find the parent pid... should be the lowest ID... but the pid file should be your best bet.
Avatar of chaitu chaitu

ASKER

i executed this command pgrep -l websphere inside websphere but nothing is coming;
Go to the UNIX command prompt and execute ps -ef  and see what Id  the WebSphere processes are running.
ASKER CERTIFIED SOLUTION
Avatar of arrkerr1024
arrkerr1024
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ps -ef | grep java

server is represented by java processes. or another way is to go under the install directory/profiles/profilename/logs/servername and then open the server.pid file