Dumping threads in server processes using scripting

Use the AdminControl object to produce a Java core dump, which includes the Java threads of a running server.

Before you begin

Before starting this task, the wsadmin tool must be running. See the wsadmin 스크립트를 사용하여 wsadmin 스크립트 클라이언트 시작 article for more information.

About this task

[z/OS]The dumpThreads command generates a Java heap dump, a Java virtual machine (JVM) initiated System Transaction Dump (TDUMP), and a Java core dump.

  • A Java heap dump includes all of the live objects on the Java heap that are being used by the running Java application.
  • A system TDUMP includes the content of all of the failing address spaces.
    문제점 방지 문제점 방지: In some circumstances, the hung thread detection process might be frequently triggered, causing system TDUMPs to be initiated. These dumps can be large and take several minutes to process. While the dumps are being processed, the server address space is not dispatchable, which might extend the length of time locks owned by the address space are held. If your server uses shared sub-systems like DB2 or WebSphere MQ, the extended length of time during which the locks might be held could adversely effect those shared sub-systems, and other address spaces that share those sub-systems. Therefore, if you experience frequent hung threads, you might want to disable the taking of system TDUMPs on the application server experiencing the hung threads.gotcha
  • A Java core dump includes all of the memory that is being used by the JVM, and includes the state of every thread in the server processes.

[z/OS]If you want to disable the generation of the heap dump, set the wsadmin_dumpthreads_enable_heapdump environment variable to 0. If you want to disable the generation of the system TDUMP, set the wsadmin_dumpthreads_enable_javatdump environment variable to 0. You can set these variables at either the node or cell level.

Procedure

Issue one of the following commands to produce a Java core dump.
  • Using Jacl:
    set jvm [$AdminControl completeObjectName type=JVM,process=server1,*]
    $AdminControl invoke $jvm dumpThreads 
  • Using Jython:
    jvm = AdminControl.completeObjectName('type=JVM,process=server1,*')
    AdminControl.invoke(jvm, 'dumpThreads')

    [z/OS]You can also use the Modify command to generate a Java core dump whenever a timeout occurs.

    [z/OS]For information about the environment variables that deal with dumping threads, refer to the Java Diagnostics guide.

Note: The dumpThreads command creates other types of dump files depending on the -Xdumps settings. Dump output varies depending on the platform and might include system core files, heap, and snap dumps.

주제 유형을 표시하는 아이콘 태스크 주제



시간소인 아이콘 마지막 업데이트 날짜: July 9, 2016 6:14
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=cord&product=was-nd-mp&topic=txml_dump
파일 이름:txml_dump.html