Configuration of Kdump under linux6

Source: Internet
Author: User

Configuration of Kdump under linux6


Background knowledge:

Kexec is a quick start mechanism that allows a Linux kernel to be launched through the context of the kernel that is already running, without having to go through the BIOS. The BIOS can consume a lot of time, especially for large servers with numerous peripherals. This approach can save a lot of time for developers who often start machines.

      kdump  is a new, and very trustworthy, kernel crash dump mechanism. The crash dump data can be obtained from the context of a newly launched kernel, not from the context of the kernel that has crashed. When the system crashes, Kdump uses kexec to boot to the second kernel. The second kernel is often called the capture kernel, boots up in small memory, and captures the dump image.

       the first kernel retains part of the memory, and the second kernel can be used to boot. Note that at startup, Kdump retains a certain amount of important memory, which alters the Red Hat Enterprise Linux 5 minimum memory requirement.

Problems:
(1) If the server often crashes (coredump), but by the lack of output information can be analyzed, you can try the Kdump Linux comes with. Kdump will start a second kernel to log the current memory information when the system kernel crashes.

(2) Kdump is often set during system installation, but if the operating system installation is complete, the Kdump value needs to be changed. This situation is a waste of time to reload the operating system.

Workaround:

Method One:

  1. Installing Kexec-tools

    See if the tool is installed by command rpm-q kexec-tools (yum install kexec-tools*)

  2. Configuring the memory size used by the Kdump

    Edit the Grub.conf file, and at the end of the kernel line add[email protected], such as:
    title Red Hat Enterprise Linux Server (2.6.18-128.el5)
    root (hd0,2)
    kernel/vmlinuz-2.6.18-128.el5 ro root=/dev/lvg/lvsysroot rhgb quiet[email protected]
    initrd/initrd-2.6.18-128.el5.img

    After modifying, reboot the system. 128M of memory (starting from 16M) is not used by normal systems and is reserved for capturing the kernel. Note that the output of free-m shows that memory is less than 128M without parameters, which is what we expect.

    Description: Can be used less than 128M, but only using 64M to do the test proved to be unreliable. (I set it to 128M)

  3. Specifies the path to which the Vmcore will be dumped

    Configure the/etc/kdump.conf file to specify the path to which the vmcore will be dumped. It can be copied to another server via SCP, or it can be a bare device, or a local file system. As shown in color, this is the dump path:

    650) this.width=650; "src=" Https://s3.51cto.com/wyfs02/M02/04/B6/wKiom1mkITTSssoFAAALboTS0uE467.png "title=" 11. PNG "alt=" Wkiom1mkittsssofaaalbots0ue467.png "/>

  4. Configuring and starting Services

    # Chkconfig Kdump on
    # service Kdump Start

    Note: The boot will fail at this time because the memory is already exhausted. Restart the server (reboot), and the core file is recorded in the/var/crash directory by default.

  5. Test

    Enter echo "C" >/proc/sysrq-trigger, the interface will appear some information, similar to the following:

    650) this.width=650; "src=" Https://s2.51cto.com/wyfs02/M01/A3/67/wKioL1mkJk_Rc07qAAD6KglvP44076.png "title=" 1351296419_3483.png "width=" "height=" 443 "border=" 0 "hspace=" 0 "vspace=" 0 "style=" width:700px;height:443px; "alt= "Wkiol1mkjk_rc07qaad6kglvp44076.png"/>

    After a while the system will automatically restart, this time will show that your kdump has been configured successfully, after restarting the/var/crash directory can see a folder, the name of the folder is the date, which is the core file you need.


Method Two:

Configured by command System-config-kdump (if there is no command, the tool may not be installed). The kdump also supports transfer to another server or to a bare device.

To install the system-config-kdump command:

Yum Install Setuptool

Yum Install-y System-config-kdump.noarch

For more information, please visit here: http://www.dedoimedo.com/computers/kdump.html
650) this.width=650; "class=" Alignnone size-medium wp-image-240 "title=" Kdump "src=" http://www.lvluo.net/blog/ Wp-content/uploads/2011/05/kdump-300x242.jpg "alt=" System-config-kdump "width=" "height=" 242 "style=" margin:0px ;p adding:0px;border:0px;vertical-align:baseline;height:auto; "/>

Or something like this:

650) this.width=650; "src=" Https://s3.51cto.com/wyfs02/M02/04/B6/wKiom1mkJKOAUxXVAAQQjWJYd4M755.png "title=" 11. PNG "width=" "height=" 398 "border=" 0 "hspace=" 0 "vspace=" 0 "style=" width:700px;height:398px; "alt=" Wkiom1mkjkoauxxvaaqqjwjyd4m755.png "/>

Note: Click the Reload button in the interface, then click "Apply" to let the configuration take effect, restart the system.

This article is from the "Hand of the Paladin Control" blog, please make sure to keep this source http://wutengfei.blog.51cto.com/10942117/1960299

Configuration of Kdump under linux6

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.