Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Tracing which java process belongs to which WAS profile

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.


0 votes


Accepted answer

Permanent link
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

1 vote

Comments

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

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.

0 votes

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details

Question asked: Mar 29 '13, 4:29 a.m.

Question was seen: 9,111 times

Last updated: Mar 29 '13, 8:12 a.m.

Confirmation Cancel Confirm