Description:
In the course of troubleshooting an issue, CA Technologies Support may ask the case owner to collect thread dumps for a locally installed, standalone Windows APM Workstation. This can be done through the following steps:
Solution:
How to Collect Thread Dumps for a Standalone Windows APM Workstation
Step 1 : Configure the Workstation for debug level logging
- CD to [Workstation_Home]\workstation\config on the user's PC
- Edit IntroscopeWorkstation.properties
Change:
- log4j.logger.Workstation=INFO, console
To:
- log4j.logger.Workstation=DEBUG, logfile
- Save the file
- Put the MOM in DEBUG mode for the duration of the Workstation test
Step 2 : Prepare the Workstation startup command line
- Start the Workstation normally (it must be running for this step)
- As a local Administrator, open a Windows command prompt
- If the taskmgr.exe can display the command string for a process, then use it to get the startup command. Otherwise, use the approach below with WMIC:
- At the command prompt, execute the following. This will output a list of all running processes including their command lines and process IDs to the file ProcessList.txt.
- WMIC /OUTPUT:C:\ProcessList.txt PROCESS get Caption,Commandline,Processid
- Open C:\ProcessList.txt with a text editor
- Scroll through the file until locating the javaw.exe command for the Workstation. It will be similar to the following:
javaw.exe "C:\ISCP\workstation\jre\bin\javaw.exe" -client -Xms64m -Xmx256m -Dsun.java2d.noddraw=true -classpath "C:\ISCP\workstation\launcher.jar;C:\ISCP\workstation;C:\ISCP\workstation\lax.jar;" com.zerog.lax.LAX "C:/ISCP/workstation/introscope_workstation.lax" "C:/Documents and Settings/Administrator/Local Settings/Temp/1/laxC.tmp" 8156
- Copy the command line out to a new text file for editing
- Remove the first set of quotes from the beginning, but leave any other quotes in place, so that the command looks something like this:
C:\ISCP\workstation\jre\bin\javaw.exe -client -Xms64m -Xmx256m -Dsun.java2d.noddraw=true -classpath "C:\ISCP\workstation\launcher.jar;C:\ISCP\workstation;C:\ISCP\workstation\lax.jar;" com.zerog.lax.LAX "C:/ISCP/workstation/introscope_workstation.lax" "C:/Documents and Settings/Administrator/Local Settings/Temp/1/laxC.tmp"
- Replace "javaw.exe" with "java.exe" (without quotes)
- Append ">>ThreadDumps.txt" to the end of the command string to write consecutive thread dumps to the file ThreadDumps.txt
- Here is an example of a completed command string:
C:\ISCP\workstation\jre\bin\java.exe -client -Xms64m -Xmx256m -Dsun.java2d.noddraw=true -classpath"C:\ISCP\workstation\launcher.jar;C:\ISCP\workstation;C:\ISCP\workstation\lax.jar;" com.zerog.lax.LAX "C:/ISCP/workstation/introscope_workstation.lax" "C:/Documents and Settings/Administrator/Local Settings/Temp/1/laxC.tmp" >>ThreadDumps.txt
Step 3 : Execute the Workstation command string and collect thread dumps
- As a local Administrator, open a command prompt window
- CD to [Workstation_Home]\workstation
- Paste the completed command string into the prompt and press <enter>.
- The Workstation UI will startup
- Exercise the Workstation until it appears to be slow or hangs, then take 10 consecutive thread dumps from the command prompt window where the Workstation is running at approximately 5 second intervals.
- To take a thread dump from the Workstation command prompt window, do a CTRL-BREAK
- Do not use CTRL-C. This will kill the Workstation process.
Step 4 : Gather documentation for CA APM Support
- Exit the Workstation, or kill with CTRL-C if it is hung
- Collect the Workstation debug log from [Workstation_Home]\workstation\logs
- Reverse Step 1 to set the Workstation logging back to INFO logging (do not leave it in DEBUG)
- Collect the thread dump file [Workstation_Home]\workstation\ThreadDumps.txt
- Collect the MOM log in DEBUG for the corresponding time period
- Set the MOM back to INFO logging
- Zip and upload all files to the CA APM Support case