Note 452067.1 &n…

In this Document
<wbr> Goal<br><wbr> Solution<br><wbr><wbr><wbr><wbr> How to Configure Kdump<br><wbr> References<br><br> Applies to:<br> Linux OS - Version: Oracle Linux 5.0 to Oracle Linux 5.6 - Release: OL5 to OL5U6<br> Linux x86<br> Linux x86-64<br> Oracle Linux 5<br> Goal<br> Kdump is the kernel crash dumping mechanism for Oracle Linux 5 - it provides a memory dump (vmcore) when the kernel experiences a critical condition. This document provides step-by-step instructions on how to configure kdump on Oracle Linux.<br> Solution<br> How to Configure Kdump<br> 1. Install the kexec-tools package if not already installed<br><br><wbr><wbr><wbr> Kexec is a fastboot mechanism which allows booting a Linux kernel from the context of already running kernel without going through BIOS. Kdump uses kexec to boot into a second kernel whenever the system crashes.<br><br> #<wbr> up2date --nox -u kexec-tools<br> Fetching Obsoletes list for channel: el5_i386_latest...<br> ########################################<br> Fetching rpm headers...<br> ########################################<br> Name<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> Version<wbr><wbr><wbr><wbr><wbr><wbr><wbr> Rel<br> ----------------------------------------------------------<br> kexec-tools<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> 1.101<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> 194.4.el5.0.1<wbr><wbr><wbr><wbr> i386<br> Testing package set / solving RPM inter-dependencies...<br> ########################################<br> kexec-tools-1.101-194.4.el5 ########################## Done.<br> Preparing<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> ########################################### [100%]<br> Installing...<br><wbr><wbr> 1:kexec-tools<wbr><wbr><wbr><wbr> ########################################### [100%]<br> #<br><br> 2. Check the file /boot/config-`uname -r`<br><br> The values specified should denote that kexec is enabled and this kernel can be used as a crash kernel:<br> CONFIG_KEXEC=y<br> CONFIG_CRASH_DUMP=y<br> ...<br><br> 3. Modify the system kernel to reserve space for the crash kernel<br><br><wbr><wbr><wbr> Edit the /etc/grub.conf file and add "crashkernel=128M@16M" to the kernel line to reserve 128MB of memory, starting at physical address 0x01000000 (16MB)<br><br> # vi /etc/grub.conf<br><wbr>...<br> title Red Hat Enterprise Linux Server (2.6.18-8.el5)<br><wbr><wbr><wbr><wbr><wbr><wbr><wbr> root (hd0,0)<br><wbr><wbr><wbr><wbr><wbr><wbr><wbr> kernel /vmlinuz-2.6.18-8.el5 ro root=/dev/VolGroup00/LogVol00 rhgb quiet crashkernel=128M@16M<br><wbr><wbr><wbr><wbr><wbr><wbr><wbr> initrd /initrd-2.6.18-8.el5.img<br><wbr>...<br><br> 4. Specify where the vmcore should be created<br><br><wbr><wbr><wbr> Different types of dump target locations can be specified in the /etc/kdump.conf file<br><wbr><wbr><wbr> Following is a sample entry that uses NFS as the location for the dump target. For example, below will mount the filesystem and copy the vmcore file to the NFS server<br><br><wbr><wbr><wbr> net my.server.com:/export/tmp<br><br><wbr><wbr><wbr> For more options, please check the /etc/kdump.conf.<br><br> 5. Update kdump configuration file - /etc/sysconfig/kdump<br><br><wbr><wbr><wbr> This file defines the dump-capture kernel specification, including its name/location, and command line for the kernel if it is to be different from the currently running kernel.<br><br> # cat /etc/sysconfig/kdump<br> KDUMP_KERNELVER=""<br> KDUMP_COMMANDLINE=""<br> KDUMP_COMMANDLINE_APPEND="irqpoll maxcpus=1"<br> KEXEC_ARGS=" --args-linux"<br> KDUMP_BOOTDIR="/boot"<br> KDUMP_IMG="vmlinuz"<br><br><br><wbr><wbr><wbr> KDUMP_COMMANDLINE modify the default crash kernel command line from /proc/cmdline<br><wbr><wbr><wbr> KDUMP_COMMANDLINE_APPEND adds irqpoll and maxcpus=1 to the command line for the crash kernel<br><wbr><wbr><wbr> KEXEC_ARGS adds --args-linux to the kexec command line<br><wbr><wbr><wbr> KDUMP_BOOTDIR is set to /boot<br><wbr><wbr><wbr> KDUMP_IMG specifies the crash kernel image name, defaulting to /boot/vmlinuz with the current kernel version appended<br><br> 6. Enable the kdump service:<br> #<wbr> chkconfig kdump on<br> #<br><br> Note: it cannot be started as the new kernel parameter is not yet in effect.<br><br> 7. Reboot the system for kdump configuration to take effect. Verify that kdump is active:<br> # cat /proc/cmdline<br> ro root=/dev/VolGroup00/LogVol00 rhgb quiet crashkernel=128M@16M<br><br> # /etc/init.d/kdump<wbr> status<br> Kdump is operational<br><br> # /sbin/chkconfig --list |grep kdump<br> kdump<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> 0:off<wbr><wbr> 1:off<wbr><wbr> 2:on<wbr><wbr><wbr> 3:on<wbr><wbr><wbr> 4:on<wbr><wbr><wbr> 5:on<wbr><wbr><wbr> 6:off<br><br><br> 8. Test kdump by crashing the system:<br> # echo c &gt; /proc/sysrq-trigger<br><br> This causes the kernel to panic, followed by the system restarting into the kdump kernel. When the boot process gets to the point where it starts the kdump service, the vmcore file should be copied to disk to the location specified in the /etc/kdump.conf file.</wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr>
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值