It's all about the answers!

Ask a question

Tracing which java process belongs to which WAS profile


KrishnaKanth Naik (76511015) | asked Mar 29 '13, 4:29 a.m.
JAZZ DEVELOPER
Environment: Windows

While using Websphere Application Server to host each of the CLM applications on a different profile (on the same machine) - If a particular application is running out of memory, how do we find out which java process belongs to which WAS profile.

One way: List the process ID in the task manager, and then open the WAS profile log directory and look for serverX.pid.

Question: Is there any other shorter way to get this done?

UseCases: If a particular profile is hung we could right click on the correct process name and create dump file.


Accepted answer


permanent link
Indradri Basu (1.8k1514) | answered Mar 29 '13, 4:43 a.m.
Hi Krishna,

Try running the following command from a command prompt on your WAS server:

wmic /output:c:\temp.html PROCESS where "name='java.exe'" get Processid,Caption,Commandline /format:htable


This will create a file in C:\ as temp.html listing all the command line environment details for each java process. In the last line of the commandline property, you should be able to see your WAS profile names and below that should be the process id. You can also use "taskkill" command in windows to kill the java process

I am sure this can be done better with some small scripting, but I think this is quick and easy.
KrishnaKanth Naik selected this answer as the correct answer

Comments
KrishnaKanth Naik commented Mar 29 '13, 7:32 a.m.
JAZZ DEVELOPER

Thank you Indradri..

To remember this command sequence is pretty difficult task :), but atleast there is a solution. Its lot better than pickingup one process ID at a time and comparing it against 5-6 (depending on the number of profiles we are working with) server.pid files.

PS: We cannot directly run wmic command windows7 machine (just for trying this out).. but then we dont support our applications on non-server OS anyways.

One other answer



permanent link
Guido Schneider (3.4k1486115) | answered Mar 29 '13, 8:12 a.m.

You simply look at the command within the Task Manager. There you see which Java.exe is for which profile. You only must enable this column.

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.