How to manually generate a Heapdump in WebSphere on Windows

本文介绍如何通过wsadmin批处理文件在Windows命令提示符下获取应用服务器的堆转储,并在遇到安全配置或SOAP端口更改时提供额外参数。包括设置问题应用服务器的JVM对象,生成堆转储,以及获取Java核心文件的方法。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

  1. From a Windows Command Prompt, enter the wsadmin.bat command to get a wsadmin command prompt. (the wasamin.bat is in :C:\IBM\WebSphere\AppServer\profiles\AppSrv01\bin not in :C:\IBM\WebSphere\AppServer\bin)
    Note: If security is enabled or the default SOAP ports have been changed, you will need to pass additional parameters to the batch file in order to get a wsadmin prompt. For example:

    wsadmin.bat [-host host_name] [-port port_number] [-user userid[-password password]

    Note: You can connect wsadmin to any of the server JVMs in the cell. After running the wsadmin command it will display the server process for which it has attached to.
  2. Get a handle to the problem application server:
    wsadmin> set jvm [$AdminControl completeObjectName type=JVM,process=server1,*]

    Where server1 is the name of the application server that you want a heapdump from. If wsadmin is connected to a Deployment Manager and if the server names in the cell are not unique, then you can qualify the JVM with a node attribute in addition to the process name.

    Note: The contents in brackets "[.....]", along with the brackets, is not optional. It must be entered to set the jvm object. Also, note that there is a space between the words "completeObjectName" and "type", but not a linefeed:
  3. Generate a heapdump:
    wsadmin> $AdminControl invoke $jvm generateHeapDump
    3B: If you want a javacore too:
    wsadmin> $AdminControl invoke $jvm dumpThreads
    (Please note that on older versions of WebSphere you will also get a heapdump when you request a javacore, so do not be surprised if you end up with two heapdumps.)
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值