强制或生成 jvm 核心转储(IBM JVM) [英] force or generate jvm core dump ( IBM JVM )

查看:46
本文介绍了强制或生成 jvm 核心转储(IBM JVM)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可能的重复:
我可以强制生成 JVM 崩溃日志文件吗?

如何在 Java 应用服务器或一般情况下强制或生成 JVM 核心转储?

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

推荐答案

问题(摘要):要诊断与在 WebSphere Application Server Community Edition 上运行的客户应用程序挂起或性能不佳相关的问题,用户需要生成各种转储并将它们发送给 IBM 支持部门进行诊断.

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.

本技术说明解释了当 WebSphere Application Server Community Edition 作为操作系统服务运行时如何生成所需的转储.本技术说明适用于 IBM Java SDK 1.5.0 和 IBM Java SDK 1.6.0

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

原因:当客户应用程序在 IBM Java SDK 1.5.0 或 IBM Java SDK 1.6.0 上使用 WebSphere Application Server Community Edition 时遇到挂起或性能不佳,并且服务器作为操作系统运行服务,服务器进程的相应命令/shell 窗口对用户不可用.因此,无法从键盘发送用户信号来触发转储.

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.

解决问题:当JVM进程命令窗口可用时,生成转储很简单,如下所示:

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

Windows:如果 JVM 设置配置为在用户发出信号时触发转储,请在命令窗口中按 CRTL+Break 以生成转储.

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: 如果 JVM 设置配置为在用户发出信号时生成转储,请在 shell 窗口中按 CTRL+\.

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

AIX: 如果 JVM 设置配置为在用户发出信号时生成转储,请在 shell 窗口中按 CTRL+\.

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

注意:为了在用户信号时生成java核心转储、系统核心转储、堆转储和快照转储,转储代理必须通过JVM选项配置如下:

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

有关如何配置转储代理的更多信息,请访问使用 -Xdump.

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

但是,如果 WebSphere Application Server Community Edition 作为操作系统服务运行,则命令窗口可能不可用.在windows上用javaw.exe启动JVM进程也会出现这种情况.

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.

在上述情况下,用户需要找到 JVM 进程的相应 process-id 并使用操作系统供应商提供或 IBM 提供的工具按照以下步骤生成转储.

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 可以从 Microsoft 开发工具站点下载以生成系统核心转储.在 WinDbg 控制台使用以下命令生成系统核心转储:

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 <dumpfile> 

其中 dumpfile 包括目录路径和系统核心转储文件的名称.确保使用 /f 选项而不是 /ma./f 生成完整转储,而 /ma 生成小型转储.IBM Java SDK 1.5.0/1.6.0 提供的 jextract 工具仅支持完整转储.

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.

适用于 Windows 的 SendSignal 实用程序.为此,必须设置 JVM 以生成关于用户信号的转储.要在用户发出信号时生成 java 核心转储、堆转储、系统核心转储和快照转储,必须在启动时向 JVM 提供以下选项:

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 

注意:SendSignal 实用程序可用于生成所有类型的转储,而 WinDbg 仅生成系统核心转储.

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

Linux 和 AIX:Linux 和 AIX 的信号是 SIGQUIT.使用命令发送用户信号来触发各种转储:

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 <PID>  

为此,必须设置 JVM 以根据用户信号生成转储.要在用户发出信号时生成 java 核心转储、堆转储、系统核心转储和快照池,必须在启动时向 JVM 提供以下选项.

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 

注意:必须使用 jextract 工具处理系统核心转储文件,并且必须将输出发送给 IBM 支持.应该使用遇到问题的同一个 JVM 的 jextract 来处理系统核心转储:

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:

<JAVA_HOME>/jre/bin/jextract <dumpfile>   

其中 dumpfile 是系统核心转储的文件名.

Where dumpfile is the filename of the system core dump.

这将生成一个 zip 文件 .zip.需要将 zip 文件发送给 IBM 支持.

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

这篇关于强制或生成 jvm 核心转储(IBM JVM)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆