More Related Content
Similar to Kdump-FUDcon-2015-Workshop
Similar to Kdump-FUDcon-2015-Workshop (20)
Kdump-FUDcon-2015-Workshop
- 5. o The c tells makedumpfile command to compress the vmcore file.
o The "d" option is used to set the dump_level.
o "dump_level" is used to decide which pages to be removed from the resultant vmcore file.
o The option is a bit mask, having each page type specified like so:
zero pages = 1
cache pages = 2
cache private = 4
user pages = 8
free pages = 16
o In general, these pages don't contain relevant information. To set all these flags and leave out these pages, use a
value of d 31.
kdump_post <binary | script>
o This directive allows you to run a specified executable just after the memory dump process terminates.
o The exit status from the dump process is fed to the kdump_post executable, which can be used to trigger different
actions for success or failure.
Eg:
kdump_post /var/crash/scripts/kdumppost.sh
kdump_pre <binary | script>
o Works just like the kdump_post directive, but instead of running after the dump process, runs immediately before.
o Exit status of this binary is interpreted as follows:
0 continue with dump process as usual
!0 reboot the system
Eg:
kdump_pre /var/crash/scripts/kdumppre.sh
extra_bins <binaries | shell scripts>
o This directive allows you to specify additional binaries or shell scripts you'd like to include in your kdump
initrd.
o Generally only useful in conjunction with a kdump_post binary or script that relies on other binaries or scripts.
Eg:
extra_bins /usr/bin/lftp
extra_modules <module(s)>
o This directive allows you to specify extra kernel modules that you want to be loaded in the kdump initrd, typically
used to set up access to nonbootpath dump targets that might otherwise not be accessible in the kdump environment.
o Multiple modules can be listed, separated by a space, and any dependent modules will automatically be included.
Eg:
extra_modules gfs2
default <reboot | halt | poweroff | shell | dump_to_rootfs>
o Used to set action to preform in case dumping to intended target fails.
o If no default action is specified, "reboot" is assumed default.
reboot: If the default action is reboot simply reboot the system and loose the core that you are trying to retrieve.
halt: If the default action is halt, then simply halt the system after attempting to capture a vmcore, regardless
of success or failure.
poweroff: The system will be powered down
shell: If the default action is shell, then drop to an shell session inside the initramfs from where you can try to
record the core manually. Exiting this shell reboots the system. Note: kdump uses bash as the default shell.
dump_to_rootfs: If nonroot dump target is specified, the default action can be set as dump_to_rootfs. That means when
dump to target fails, dump vmcore to rootfs from initramfs context and reboot.
Eg:
default shell
force_rebuild <0 | 1>
o By default, kdump initrd only will be rebuilt when necessary.
o Specify 1 to force rebuilding kdump initrd every time when kdump service starts.
Eg:
force_rebuild 1