If FishEye/Crucible stops responding or is showing poor performance, providing thread dumps to Support can help diagnose the problem. |
We now have scripts for generating thread dumps externally on Windows. Download them from this Bitbucket Repository.
Right click on the titlebar for the command console window where FishEye/Crucible is running to open the Properties dialog box.
[Layout] タブを選択します。
Under Screen Buffer Size, set the Height to 3000 and click OK.
Press CTRL-BREAK on your keyboard.
This will output the thread dump to the command console.
"Full thread dump" と書かれた行まで、コマンド コンソールをスクロールします。
Right click the title bar and select Edit -> Mark.
Highlight the entire text of the thread dump.
Right click the title bar and select Edit -> Copy.
Open a text editor and paste the thread dump and save the file.
| VisualVM is only provided as part of the Java Development Kit (JDK) distribution of Java. The JDK is not packaged with FishEye/Crucible, and will need to be downloaded separately. Your JAVA_HOME environment variable specifies which version of the Java Virtual Machine (JVM) FishEye/Crucible uses. If no JAVA_HOME environment variable is set, FishEye/Crucible uses the Java Runtime Enviroment (JRE) version packaged with the application. |
Add the following JMX parameters to the %_EXECCMD% %FISHEYE_OPTS% property (within the existing quotes)
-Dcom.sun.management.jmxremote.port=6080 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false |
| You must choose a free port for JMX to bind to – this example uses port 6080 |
Restart FishEye/Crucible.
Start VisualVM: <JDK installation directory>\bin\jvisualvm.exe
Select File > Add JMX Connection.
Type: localhost:<your JMX port>
Select com.cenqua.fisheye.FishEyeCtl application in the left-hand pane under Local.
Select the Threads tab in the right pane.
Click Thread Dump.
Add the following JMX parameters to the service configuration on the Java tab under Java:
-Dcom.sun.management.jmxremote.port=6080 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false |
| You must choose a free port for JMX to bind to – this example uses port 608 |
[Apply] > [OK] の順にクリックします。
Restart FishEye.
Open Task Manager.
Look for the Process Name Common Daemon Services Runner.
Open the tree for the process and look for the sub-process "Atlassian FishEye". The PID for the process will be located under the PID column.
| If you are running multiple Atlassian products on the same server, each will have a separate Process Name Common Daemon Services Runner. |
Start VisualVM: <JDK installation directory>\bin\jvisualvm.exe
Select File > Add JMX Connection.
Type: localhost:<your JMX port> and click OK.
Select localhost:<your JMX port> in the left-hand pane under "Local".
Select the Threads tab in the right pane.
Click Thread Dump.
Select the Threads tab.
Find the process ID of FishEye/Crucible the JVM using the ps command.
FC_PID=`ps aux | grep -i fisheye | grep -i java | awk -F '[ ]*' '{print $2}'`; |
Run the following command 6 times with a 10 second interval:
top -b -H -p $FC_PID -n 1 > fisheye_cpu_usage.`date +%s`.txt; jstack -l $FC_PID > fisheye_threads.`date +%s`.txt |
Look in the resulting CPU usage files (fisheye_cpu_usage.<timestamp>.txt) to identify which threads are consistently using a lot of CPU time.
Find the process ID of FishEye/Crucible the JVM using the ps command:
ps aux | grep -i fisheye | grep -i java | awk -F '[ ]*' '{print $2}' |
Run the following command 6 times with a 10 second interval:
| The kill -3 command will NOT terminate your FishEye/Crucible process. |
kill -3 <pid> |
| The thread dump will be printed to FishEye/Crucible's standard output (fisheye.out). |