如何手动生成heapdump和javacore文件

一、生成javacore文件

  1. 安装目录WebSphere\AppServer\bin\wsadmin.bat
  2. 输入命令  wsadmin>set jvm [$AdminControl completeObjectName type=JVM,process=server1,*]          
  3. 输入命令  wsadmin>$AdminControl invoke $jvm dumpThreads
  4. 安装目录\WebSphere\AppServer\profiles\default下生成javacore文件(例:javacore.20090804.111947.2632.txt)
  5. 用javacore文件分析器对javacore文件进行分析
  6. cd /d javacore文件分析器放置路径>java –Xmx1000m –jar jca31.jar

 

二、生成heapdump文件

  1. 安装目录WebSphere\AppServer\bin\wsadmin.bat
  2. 输入命令  wsadmin>set objectName [$AdminControl queryNames WebSphere:type=JVM,process=server1,*]
  3. 输入命令  wsadmin>
    $AdminControl invoke $objectName generateHeapDump
  4. 安装目录\WebSphere\AppServer\profiles\default下生成HeapDump文件(例:heapdump.20090804.113353.2632.phd)
  5. 用heapdump文件分析器对heapdump文件进行分析
  6. cd /d heapdump文件分析器放置路径>java –Xmx1000m –jar ha33.jar

Generate javacore file

1. open cmd
2. go to WAS installation directory, e.g. WebSphere\AppServer\bin
3. run wsadmin.bat
4. wsadmin>set jvm [$AdminControl completeObjectName type=JVM,process=server1,*]
5. wsadmin>$AdminControl invoke $jvm dumpThreads
6. then we can use IBM Thread and Monitor Dump Analyzer to analyze.
https://www.ibm.com/developerworks/community/groups/service/html/communityoverview?communityUuid=2245aa39-fa5c-4475-b891-14c205f7333c


How to generate heapdump file explicitly in local Windows env environment

1. open cmd
2. go to WAS installation directory, e.g. WebSphere\AppServer\bin
3. run wsadmin.bat
4. wsadmin>set objectName [$AdminControl queryNames WebSphere:type=JVM,process=server1,*]
5. wsadmin>$AdminControl invoke $objectName generateHeapDump
6. then we can use IBM HeapAnalyzer to analyze the file.
https://www.ibm.com/developerworks/community/groups/service/html/communityview?communityUuid=4544bafe-c7a2-455f-9d43-eb866ea60091



展开阅读全文
博主设置当前文章不允许评论。

没有更多推荐了,返回首页