How to generate HeapDump logs using IBMJDK in linux

Source: Internet
Author: User
Ibmjdkgenerate heapdumplog in linux. the nearest server is the slave machine, and log files such as .phd and javacore...txt will be generated at the same time. It indicates that the server is down due to OOM or other reasons. This can be obtained only when the server is down... the Apache dump log generated by ibm jdk in linux is the latest server. log files such as .phdand javacore...txt will be generated at the same time. It indicates that the server is down due to OOM or other reasons. These logs can be obtained only when the server is down. how can I manually generate these logs for analysis when the server responds slowly? The log javacore....txt can be generated using the kill-3 route number, but the. phd file cannot be generated. The. phd file is the JVM memory ing file, which can be obtained to analyze the JVM memory at this time, and then analyze the cause of server downtime. Www.2cto.com requires the following settings for ibm jdk: 1. set JVM parameters:-XX: + HeapDumpOnOutOfMemoryError-XX: + HeapDumpOnCtrlBreak2. set OS environment variables: export IBM_HEAP_DUMP = true export IBM_HEAPDUMP = true export IBM_HEAPDUMP_OUTOFMEMORY = true export IBM_JAVADUMP_OUTOFMEMORY = true export IBM_JAVACORE_OUTOFMEMORY = true restart the server. If the problem persists, add a line in the server startup script :#! /Bin/ksh #... set-m some variable... www.2cto.com reference: 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 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 ""#! /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. the Heapdump file generated by hp jdk must be added to the environment variable with export _ JAVA_HEAPDUMP = 1.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.