달력

3

« 2024/3 »

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31

'javacore 분석툴'에 해당되는 글 2

  1. 2008.11.14 [IBM Dump Analyzer] javacore 분석툴 jca 사용하기 2
  2. 2008.11.13 IBM Thread and Monitor Dump Analyzer


[IBM Dump Analyzer] javacore 분석툴 jca 사용하기

jca 툴은 javacore 를 분석할 수 있는 툴입니다. 
덤프파일의 생성은 JVM이 죽을경우 코어 파일을 만들어지게 됩니다.
또는 사용자가 직접 kill -3 PID 명령어를 이용해 덤프 파일을 생성하시면 되겠죠.
이 툴은 ibm 에서 제공하구요. 참고로 heapdump 를 분석하는 툴로 HeapAnalyzer 가 있다고하네요.
이글은 툴 다운로드 부터 실행까지 입니다. 자세한건 사용하시면서 알아가시면 될듯합니다. ^^
코어 분석에 도움 참고 사이트로 J2EE 어플리케이션에서 Bottleneck의 발생과 대처 방법 가 있습니다.




jca 툴 다운로드 : http://www.alphaworks.ibm.com/tech/jca/download




다운로드시 로그인을 하셔야 합니다. ^^;  ibm ID가 없으시면 procees without an IBM ID 메뉴를 이용하시면 됩니다.



 asterisk (*)  체크된 부분만 입력하시고   I confirm 버튼 누르시면 됩니다.
참고로 View license 읽어보시구요. 한글도 지원하네요.

The fields indicated with an asterisk (*) are required to complete this transaction; other fields are optional. If you do not want to provide us with the required information, please use the "Back" button on your browser to return to the previous page, or close the window or browser session that is displaying this page.







jca31.zip 파일 다운로드가 완료 되시면 적당한 곳에 압축을 풀어주세요.

C:\jca31  전 여기에 풀었습니다.



툴 실행전에 사용자 환경에 자바가 설치 되어 있어야 합니다. ^^

경로 이동후 jar 파일을 실행 해주세요

java –Xmx300m –jar jca31.jar

경로 이동후 jar 파일을 실행 해주세요. 실행 때  -Xmx 옵션을 적용해서 메모리를 여유있게 주는것이 좋다고 하네요.




툴은 스윙으로 만들어져 있었습니다.

 Compre Threads 메뉴 이용해서 여러개의 javacore 파일을 비교 분석할 수도 있고




메모리상황 그리고 Thread의 Detail 한 정보까지 볼 수 있습니다.


참고로 readme31.zip 파일이 있습니다.

압축을 풀어보시면 readme.htm 파일이 있구요. 그걸 실행시키면

사용방법이 있습니다. 참고하시면 될듯합니다.   참고 : http://starplaying.tistory.com/81

 

:
Posted by 라면스프
2008. 11. 13. 21:00

IBM Thread and Monitor Dump Analyzer Enjoy/JAVA2008. 11. 13. 21:00


출처 : http://www.alphaworks.ibm.com/tech/jca
다운로드 : http://www.alphaworks.ibm.com/tech/jca/download

참고페이지 : http://starplaying.tistory.com/82

How to run IBM Thread and Monitor Dump Analyzer for Java

You need to use the Java 2 Platform, Standard Edition version 5.0 or higher Java Runtime Environment (JRE) to run IBM Thread and Monitor Dump Analyzer for Java.

Usage <Java path>java –Xmx[heapsize] –jar jca<Thread and Monitor Dump Analyzer for Java version>.jar [javacore files separated by path delimiter] [analysis output HTML file]

 

For example,

C:\java\bin\java –Xmx200m –jar jca13.jar

=> Starts IBM Thread and Monitor Dump Analyzer for Java version 1.3 and open javacore files from menu.

 

/usr/java/bin/java –Xmx200m –jar /usr/jca/jca13.jar /usr/javacore.20060228.171037.2084.txt;/usr/javacore.20060228.171048.2084.txt

=> Starts IBM Thread and Monitor Dump Analyzer for Java version 1.3 with /usr/javacore.20060228.171037.2084.txt and /usr/javacore.20060228.171048.2084.txt

 

java –Xmx500m –jar jca13.jar  /usr/javacore.20060228.171037.2084.txt;/usr/javacore.20060228.171048.2084.txt output.html (On Windows system)

=> Starts IBM Thread and Monitor Dump Analyzer for Java with /usr/javacore.20060228.171037.2084.txt and /usr/javacore.20060228.171048.2084.txt and generates analysis output in output.html without invoking graphical user interface

 

WARNING: If the analysis output HTML file exists, the tool will overwrite the file.

 

If there’s java.lang.OutOfMemoryError while you are processing Javacore files, please try increasing the maximum heap size (-Xmx) value to give the JVM more memory.

Maximum heap size should not be larger than the size of available physical memory size for this tool due to performance issue.

 

1. Start IBM Thread and Monitor Dump Analyzer for Java

 

 

The following screen is a snapshot of the initial screen.

 

 

 

2. Select File-> Open Thread Dumps to open Javacore files if you didn’t specify Javacore files in the command line during the startup.

  

3. You can select multiple Javacore files

 

 

 

 

4. Loaded Javacore files are listed in the Thread Dump List table.

 

 

 

  

Thread Dump List provides the following information:

  • Name: The file name of Javacore
  • Runnable/Total Threads : Number of runnable and total threads
  • Free/Allocated Heap : Amount of free and allocated Java heap
  • AF/GC Counter: Allocation Failure and Garbage Collector counter
  • Monitor : Number of Monitors locked. Deadlock is displayed if there’s any deadlock in Monitor

 

 

5. Click on a Javacore to display summary of the Javacore.

 

The following information is displayed for IBM Javacore:

 

  • File name
  • Cause of thread dump
  • Date
  • Process ID
  • Java version
  • Java Heap Information
    • Maximum Java heap size
    • Initial Java heap size
    • Garbage Collector Counter
    • Allocation Failure Counter
    • Free Java heap size
    • Allocated Java heap size
  • Current Thread Name
  • Number of loaded classes in Java heap
  • Recommended size of kCluster (Only applicable to IBM SDK 1.4.2 and 1.3.1 SR7 or later)
  • Java Command line

 

Non-IBM Javacore ( or thread dump ) provides limited information.

 

 

 

 

6. Click on Right Button of your mouse to bring up a menu.Or click on Analysis menu to display sub menu

 

 

 

7. The following is Thread Detail View of a Javacore:

 

Threads are sorted by thread name. Thread Detail View provides the following information:

 

  • Thread Name : The name of a thread
  • Thread State : The state of a thread for example, Runnable, Waiting or Suspended
  • Method Name : The latest method invoked or predefined status or stack trace pattern for example, IDLE, LISTEN and KEEP-ALIVE
  • Java Stack Trace : Java Stack Trace is shown when a thread is selected.
  • Native Stack Trace : Native Stack Trace is shown below Java Stack Trace if it’s available

 

 

NOTE:

  • An IDLE thread is a thread that is ready to receive work but does not have a connection established.
  • A KEEP-ALIVE thread is an idle thread that is ready to receive work and does have a connection established.
  • A LISTEN thread listens on a port

 

 

8.If  a thread owns monitors, thread name is marked with a special icon and threads that are waiting for monitor lock are displayed.

In the following example, the thread,Plato priority9, has monitor ownership icon. In waiting threads list, Aristotle and Socrates threads are displayed.

 

 

 

If a thread is waiting for monitor lock, thread name is marked with a special icon and thread that owns monitor lock is displayed.

In the following example, the thread,Aristotle priority5, has waiting for monitor lock icon in name column.

In Blocked by list, Plato priority9 which owns the monitor is displayed:

 

 

 

 

9. You can sort any column by clicking on table header. The following is Thread Detail View sorted by thread state

 

 

 

 

10. The following is Thread Detail View sorted by method.

 

 

 

 

11.Deadlock threads are shown in gray by default as follows:

 

 

 

12. Select multiple Javacore by holding Ctrl key and click on right button of your mouse and select Compare Threads

 Or select Analysis -> Compare Threads to display Compre Threads View

 

 

 

13.  The following is Compre Threads View of two Javacore.


Summary is displayed in the right pane. Thread name and method name are displayed from each Javacore on the table.

 

  • Process ID
  • First Dump : Timestamp of the first Javacore
  • Last Dump : Timestamp of the last  Javacore
  • Garbage Collections per Minute :  Number of Garbage Collections per minute
  • Allocation Failures per Minute : Number of Allocation Failures per minute
  • Elapsed Time : Time between the first Javacore and the last Javacore
  • Number of hang suspects
  • List of hang suspects

 

 

 

 

Red background indicates there’s possible hang in the thread. Green border indicates runnable thread. Blue border indicates waiting on monitor. Yellow border indicates waiting on condition.

 

14. Thread summary is displayed when a thread is selected.

 

 

 

15. Select Monitor Detail to display Monitor Detail View

 

 

 

 

 

16.    Monitor lock information is displayed in tree format

 

Total Size is total number of threads directly and indirectly related with a specific monitor.

Size is number of threads directly related with a specific monitor.

 

 

Click on one of the threads.

 

 

There are 47 threads waiting for the monitor which is locked by Servlet Engine Transports : 3049

 

 

Deadlock threads are displayed with the icon,

as follows:

 

 

17. You can click on any thread to display detailed information about monitor and thread information

 

 

 

18. You can also compare Monitor in Compare Monitor View. Select Compare Monitors Menu

 

 

 

19. Red line indicates there’s possible hang in a specific thread in Compare Monitors View.

 

 

If you click on a thread, list of threads waiting for the locks that the thread owns is displayed in the middle pane. If you click on any thread in the middle pane, thread information is displayed on the right pane.

 

20. Select View-> Option to configure IBM Thread and Monitor Dump Analyzer for Java.


 

 

21. You can change default directory, color and other options.

 

 

22-1. Select a state in Color and click on Change button to change color.

 

 

 

 

22-2. Select a color and click on OK

 

 

 

23.In Advanced pane of option , you can customize stack trace pattern recognition engine:

 

·        ID List : ID list of customized stack trace pattern

·        ID : Identifier of stack trace pattern. No spaces allowed.

·        Stack Name : Stack trace pattern name that is seen from Thread Detail View

·        Stack Trace : Stack trace pattern. Syntax : “at package.class.method”.   No parenthesis allowed.

·        Description : description of a stack trace pattern

·        The tool will search for stack trace pattern and display Stack Name in Thread Detail View if any matching is found

·        WARNING : Please reopen thread dumps if new stack trace patterns are added if thread dumps are already loaded.

 

 

 

24. You can delete message in console by selecting Clear Console Menu

 

 

 

 

25. Select Close Thread Dumps to unload Javacore files.

 

 

26. Help menu displays help screen.

 

 

 

27. Select Help->About to display version information of IBM Thread and Monitor Dump Analyzer for Java

 

 

 

Copyrights and Notices

 

(C) Copyright IBM Corporation 2005-2008. All Rights Reserved. Note to U.S. Government Users Restricted Rights -- Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.

 

AIX, Cloudscape, DB2, IBM, iSeries, OS/390, WebSphere, and z/OS are trademarks or registered trademarks of IBM Corporation in the United States and/or other countries.

 

Java and all Java-based trademarks and logos are trademarks of Sun Microsystems, Inc. in the United States and/or other countries.

 

Microsoft, Windows, and Windows NT are trademarks of Microsoft Corporation in the United States and/or other countries.

 

UNIX is a registered trademark of The Open Group.

 

Other company, product, and service names may be trademarks or service marks of others.

 

The following paragraph does not apply to the United Kingdom or any other country where such provisions are inconsistent with local law:

 

INTERNATIONAL BUSINESS MACHINES CORPORATION PROVIDES THIS TOOLS "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OR CONDITIONS OF NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Some states do not allow disclaimer of express or implied warranties in certain transactions, therefore, this statement may not apply to you. This information could include technical inaccuracies or typographical errors. Changes are periodically made to the information herein; these changes will be incorporated in new editions of the tool. IBM may make improvements and/or changes in the product(s) and/or the program(s) described in this tools at any time without notices.


참고페이지 : http://starplaying.tistory.com/82

:
Posted by 라면스프