java转储和核心,强制或生成jvm核心转储(IBM JVM)

How can I force or generate a JVM core dump on an Java application server or in general?

解决方案

Problem(Abstract): To diagnose the problems related to hang or poor performance of customer applications running on WebSphere Application Server Community Edition, users would be required to generate the various dumps and send them to IBM Support for diagnosis.

This technote explains how to generate required dumps when WebSphere Application Server Community Edition is running as an operating system service. This technote applies to IBM Java SDK 1.5.0 and IBM Java SDK 1.6.0

Cause: When customer applications experience hang or poor performance with WebSphere Application Server Community Edition on IBM Java SDK 1.5.0 or IBM Java SDK 1.6.0, and the server is running as an operating system service, the corresponding command/shell window of the server process is not available to users. As a result, user signals can not be sent from the keyboard to trigger dumps.

Resolving the problem: When the JVM process command window is available, generating dumps is straight forward as follows:

Windows:

If the JVM setting is configured to trigger the dumps at user signal, press CRTL+Break on the command window to generate the dumps.

Linux: If the JVM setting is configured to generate the dumps at user signal, press CTRL+\ on the shell window.

AIX: If the JVM setting is configured to generate the dumps at user signal, press CTRL+\ on the shell window.

Note: In order to generate java core dump, system core dump, heap dump and a snap dump at user signal, the dump agents must be configured through JVM options as follows:

-Xdump:java+heap+system+snap:events=user

For more information on how to configure dump agents, visit using -Xdump.

However, if WebSphere Application Server Community Edition is running as an operating system service, the command window may not be available. This case will also arise when JVM process is started with javaw.exe on windows.

In the preceding circumstances, user is required to find the corresponding process-id of the JVM process and use operating system vendor supplied or IBM supplied tools to generate the dumps by following the below steps.

Windows: WinDbg can be downloaded from Microsoft Dev tools site to generate system core dumps. Use the following command at the WinDbg console to generate the system core dump:

dump /f

Where dumpfile includes the directory path and the name of the system core dump file.

Make sure that /f option is used instead of /ma. The /f generates full dump where as /ma generates mini dump. Only full dumps are supported with the jextract tool supplied with IBM Java SDK 1.5.0/1.6.0.

SendSignal utility for Windows. For this, the JVM must be setup to generate the dumps on user signals. To generate the java core dump, heap dump, system core dump and a snap dump at user signal, the following option must be supplied to JVM at startup:

-Xdump:java+heap+system+snap:events=user

Note: The SendSignal utility can be used to generate all types of dumps where as WinDbg generate only system core dumps.

Linux and AIX: The signal for Linux and AIX is SIGQUIT. Use the command to send the user signal to trigger the various dumps:

kill -3

For this, JVM must be setup to generate the dumps on user signal. To generate the java core dump, heap dump, system core dump and a snap sump at user signal, the following option must be supplied to JVM at startup.

-Xdump:java+heap+system+snap:events=user

Note: System core dump files must processed using the jextract tool and the output must be send to IBM support. The jextract from the same JVM that experienced the problem should be used to process the system core dump:

/jre/bin/jextract

Where dumpfile is the filename of the system core dump.

This will produce a zip file .zip. The zip file needs to be sent to IBM support.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值