最近服务器老是宕机,同时会生成.phd,javacore....txt等日志文件。说明此时服务器已经发生OOM或者由于其他原因导致了服务器宕机。每次必须等到服务器宕机时才能获取这些日志,服务器响应慢时,怎样手工生成这些日志分析呢?
通过kill -3 进程号能生成javacore....txt日志,但是没法生成.phd文件。而.phd文件是JVM内存映射文件,获取它才能分析此时JVM内存的情况,进而分析出服务器宕机的原因。
对于IBM JDK需要做以下设置:
1.设置JVM参数:
-XX:+HeapDumpOnOutOfMemoryError -XX:+HeapDumpOnCtrlBreak
2.设置操作系统环境变量:
export IBM_HEAP_DUMP=true
export IBM_HEAPDUMP=true
export IBM_HEAPDUMP_OUTOFMEMORY=true
export IBM_JAVADUMP_OUTOFMEMORY=true
export IBM_JAVACORE_OUTOFMEMORY=true
重启服务器。如果这样仍然解决不了问题,则需要在服务器启动脚本添加一行:
#!/bin/ksh
#...
set -m
some variable...
参考知识:
Issue:
When WebLogic server (any version) is started in the background on a UNIX system, "kill -3" will not produce a thread dump as it does when the JVM is run in the foreground. This causes problems for support and debugging since some installations run WebLogic under nohup in the background so that the process is no longer associated with a terminal (so the originating terminal can logoff).
Resolution:
Modify the first line of the startWebLogic.sh shell script (or whatever name you are using) to cause the startup script to be run by the Korn shell (ksh), and set monitor mode in the shell script.
This is done by changing the first line of the script (the one containing "#!/bin/sh" to "#!/bin/bin/ksh" -- if that is where ksh is installed on your machine.
- then add a line: "set -m" as the first, non-comment, executable line of the shell, e.g., right before the JAVA_HOME variable is set. This causes all processes executed by the shell script to be leaders of their own process groups, allowing them to respond to the "kill -3" signal. The Korn shell must be used since the Bourne shell does not provide the "-m" setting.
When WebLogic server (any version) is started in the background on a UNIX system, "kill -3" will not produce a thread dump as it does when the JVM is run in the foreground. This causes problems for support and debugging since some installations run WebLogic under nohup in the background so that the process is no longer associated with a terminal (so the originating terminal can logoff).
Resolution:
Modify the first line of the startWebLogic.sh shell script (or whatever name you are using) to cause the startup script to be run by the Korn shell (ksh), and set monitor mode in the shell script.
This is done by changing the first line of the script (the one containing "#!/bin/sh" to "#!/bin/bin/ksh" -- if that is where ksh is installed on your machine.
- then add a line: "set -m" as the first, non-comment, executable line of the shell, e.g., right before the JAVA_HOME variable is set. This causes all processes executed by the shell script to be leaders of their own process groups, allowing them to respond to the "kill -3" signal. The Korn shell must be used since the Bourne shell does not provide the "-m" setting.
HP JDK生成Heapdump文件需要在在环境变量上,加上export _JAVA_HEAPDUMP=1
相关推荐
1. **生成heap dump**:在JVM启动时添加`-XX:+HeapDumpOnOutOfMemoryError`参数,或者通过JMX、JConsole等方式手动触发dump生成。 2. **下载并安装分析工具**:如VisualVM或MAT,确保其版本与JVM兼容。 3. **加载...
在Linux 64位环境下,IBM JDK 1.6能够充分利用操作系统的优势,提供更好的内存管理和更高的处理能力。由于64位系统可以处理更大的内存地址空间,因此对于需要大量内存的应用来说,IBM JDK 1.6在64位系统上的表现通常...
要生成heapdump,可以使用JVM内置的命令行选项,例如`-XX:+HeapDumpOnOutOfMemoryError`来配置JVM,在出现OOM错误时自动创建heapdump,或者使用`jmap`工具(需要与JDK配套)手动触发dump: ```bash jmap -dump:...
IBM最新java heapdump分析工具 java -jar ha.jar -Xmx4096m ha.jar
首先,IBM JDK 1.5在兼容性方面进行了加强,确保了与Oracle JDK 1.5的源代码兼容性,这意味着开发者可以在IBM JDK环境下编写和运行已经在Oracle JDK上测试过的Java程序。同时,IBM JDK也针对Linux 64位架构进行了...
软件介绍: IBM websphere 服务器出现内存溢出或其他故障时,会生成heapdump文件,本工具用于分析heapdump,查找错误原因。运行IBN WEBSPHERE HEAPDUMP需要安装JDK1.8框架。
ibm版本的jdk1.8 for linux x64,已测试可用,安装无需root权限
heapdump分析工作heapanalyzer的使用及工具 java -Xmx1000m -jar ha443.jar
而`heapdump`文件则是JVM在运行过程中,通过Java的`jmap`命令或者`VisualVM`等工具手动触发生成的,它记录了JVM堆内存的详细状态,包括对象实例、类加载器、垃圾收集信息等。`ha`(Heap Analysis)工具则用于分析`...
IBM JDK1.6 安装版
jdk1.7_linux Linux版零积分jdk1.7_linux Linux版零积分免费下载jdk1.7_linux Linux版零积分免费下载jdk1.7_linux Linux版零积分免费下载jdk1.7_linux Linux版零积分免费下载jdk1.7_linux Linux版零积分免费下载jdk...
ibm jdk 1.5 linux 版本,已经在官方网站上下载不了的,官方最低版本就是1.6,目前已经绝版了,经过自己的测试,完全是可以使用的
IBM JDK 1.5 for Linux 是IBM公司针对Java Development Kit (JDK)的一个特定版本,专为Linux操作系统设计。在Java开发和运行环境中,JDK是核心组件,它包含了Java虚拟机(JVM)、编译器、类库以及其他工具,使得开发者...
在JDK安装目录下的`bin`目录下,可以找到这个工具。`jmap`的主要功能包括: 1. **生成堆转储文件**:通过`-dump:format=b,file=<filename>`选项,我们可以将Java进程的堆内存信息导出为一个二进制格式的文件,通常...
ibm JDK5.0 for linux 这个东西很难下的,
ibm JDK5.0 fro linux,这个东西很难下的。
IBMJDK1.6版本sdk
测试可用的linux版jdk1.5,jdk-1_5_0_19-linux-i586-rpm.bin
linux jdk1.8linux jdk1.8linux jdk1.8linux jdk1.8linux jdk1.8linux jdk1.8linux jdk1.8linux jdk1.8linux jdk1.8linux jdk1.8linux jdk1.8linux jdk1.8linux jdk1.8linux jdk1.8linux jdk1.8linux jdk1.8linux ...
IBM Webpshere 8.5.0ND版自带的商业JDK,版本信息如下: java version "1.6.0" Java(TM) SE Runtime Environment (build pwa6460_26sr2ifix-20120419_02(SR2+IV19661)) IBM J9 VM (build 2.6, JRE 1.6.0 Windows ...