1. 将脚本放致profiles\appservername\bin下
2. 查看一下soap
host(在控制台端口中可以看到)
3. 执行如下命令:./wsadmin.sh
-host localhost(指出要截dump或core的机器)
-port soapport -username wasadmin -password
wasadmin -f jvmDump.jacl
4. ./wsadmin.sh -host localhost(指出要截dump或core的机器)
-port soapport -username wasadmin -password
wasadmin -f heapDump.jacl
</pre><pre name="code" class="plain">set jvm [$AdminControl completeObjectName type=JVM,process=server1,*] puts stdout "About to start dumping javaheap ..." puts stdout [$AdminControl invoke $jvm generateHeapDump]<pre name="code" class="plain">
</pre><pre name="code" class="plain">set jvm [$AdminControl completeObjectName type=JVM,process=server1,*] puts stdout "About to start dumping javacore ..." $AdminControl invoke $jvm dumpThreads puts stdout "Done dumping javacore."
puts stdout "Done :)"
时间: 2024-11-15 00:50:39