chaitu chaitu
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.
From inside of websphere or just from a unix command prompt? From a command prompt you could "pgrep -l websphere".
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.
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.
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.
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ps -ef | grep java
server is represented by java processes. or another way is to go under the install directory/profiles/profile name/logs/ servername and then open the server.pid file
server is represented by java processes. or another way is to go under the install directory/profiles/profile
may help you:
http://tinyurl.com/2utgsc