最近服务器老是宕机,同时会生成.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
相关推荐
linux 64位IBM JDK1.6
linux 64位 IBM JDK1.5
软件介绍: IBM websphere 服务器出现内存溢出或其他故障时,会生成heapdump文件,本工具用于分析heapdump,查找错误原因。运行IBN WEBSPHERE HEAPDUMP需要安装JDK1.8框架。
ibm版本的jdk1.8 for linux x64,已测试可用,安装无需root权限
IBM JDK1.6 安装版
ibm jdk 1.5 linux 版本,已经在官方网站上下载不了的,官方最低版本就是1.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 JDK5.0 fro linux,这个东西很难下的。
websphere javacore与heapdump文件分析工具,jca是javacore分析工具,ha是heapdump分析工具,需要用jdk1.6打开
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 JDK5.0 for linux 这个东西很难下的,
测试可用的linux版jdk1.5,jdk-1_5_0_19-linux-i586-rpm.bin
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 ...
JDK在linux下的安装教程,详细说明了如何在linux下进行安装
JDK 18 linux 64位 压缩包,解压即可安装。 JDK配置说明: JAVA_HOME:解压目录 path:%JAVA_HOME%/bin; classpath:.;%JAVA_HOME%\lib;%JAVA_HOME%\lib\tools.jar
Linux下如何安装和卸载JDK
jdk1.7 jdk1.8 linux 64位下载,jdk1.7 jdk1.8 linux 64位下载
ibm jdk5.0,开放的策略文件,解决默认ibm的jdk对密码算法的长度限制,下载后替换掉JAVA_HOME/jre/lib/security/中现有的两个包。
在linux下安装JDK,在linux下安装JDK,在linux下安装JDK
官网上始终下部不下来,找了好久才找到,供大家学习之用,保证好用