893e0b
.TH KDUMP.CONF 5 "07/23/2008" "kexec-tools"
893e0b
893e0b
.SH NAME
893e0b
kdump.conf \- configuration file for kdump kernel.
893e0b
893e0b
.SH DESCRIPTION 
893e0b
893e0b
kdump.conf is a configuration file for the kdump kernel crash
893e0b
collection service.
893e0b
893e0b
kdump.conf provides post-kexec instructions to the kdump kernel. It is
893e0b
stored in the initrd file managed by the kdump service. If you change
893e0b
this file and do not want to reboot in order for the changes to take
893e0b
effect, restart the kdump service to rebuild the initrd.
893e0b
893e0b
For most configurations, you can simply review the examples provided
893e0b
in the stock /etc/kdump.conf.
893e0b
893e0b
.B NOTE: 
893e0b
For filesystem dumps the dump target must be mounted before building
893e0b
kdump initramfs.
893e0b
893e0b
kdump.conf only affects the behavior of the initramfs.  Please read the
893e0b
kdump operational flow section of kexec-kdump-howto.txt in the docs to better
893e0b
understand how this configuration file affects the behavior of kdump.
893e0b
893e0b
.SH OPTIONS
893e0b
893e0b
.B raw <partition>
893e0b
.RS
893e0b
Will dd /proc/vmcore into <partition>.  Use persistent device names for
893e0b
partition devices, such as /dev/vg/<devname>.
893e0b
.RE
893e0b
893e0b
.B nfs <nfs mount>
893e0b
.RS
893e0b
Will mount nfs to <mnt>, and copy /proc/vmcore to <mnt>/<path>/%HOST-%DATE/,
893e0b
supports DNS. Note that a fqdn should be used as the server name in the 
893e0b
mount point.
893e0b
.RE
893e0b
893e0b
.B ssh <user@server>
893e0b
.RS
893e0b
Will scp /proc/vmcore to <user@server>:<path>/%HOST-%DATE/,
893e0b
supports DNS. NOTE: make sure user has necessary write permissions on
893e0b
server and that a fqdn is used as the server name.
893e0b
.RE
893e0b
893e0b
.B sshkey <path>
893e0b
.RS
893e0b
Specify the path of the ssh key to use when dumping via ssh.
893e0b
The default value is /root/.ssh/kdump_id_rsa.
893e0b
.RE
893e0b
893e0b
.B <fs type> <partition>
893e0b
.RS
893e0b
Will mount -t <fs type> <partition> <mnt>, and copy /proc/vmcore to
893e0b
<mnt>/<path>/%DATE/.  NOTE: <partition> can be a device node, label
893e0b
or uuid.  It's recommended to use persistent device names such as
893e0b
/dev/vg/<devname>.  Otherwise it's suggested to use label or uuid.
893e0b
.RE
893e0b
893e0b
.B path <path>
893e0b
.RS
893e0b
"path" represents the file system path in which vmcore will be saved.
893e0b
If a dump target is specified in kdump.conf, then "path" is relative to the
893e0b
specified dump target.
893e0b
.PP
893e0b
Interpretation of "path" changes a bit if the user didn't specify any dump
893e0b
target explicitly in kdump.conf. In this case, "path" represents the
893e0b
absolute path from root.  The dump target and adjusted path are arrived
893e0b
at automatically depending on what's mounted in the current system.
893e0b
.PP
893e0b
Ignored for raw device dumps.  If unset, will use the default "/var/crash".
893e0b
.RE
893e0b
893e0b
.B core_collector <command> <options>
893e0b
.RS
893e0b
This allows you to specify the command to copy the vmcore.
893e0b
The default is makedumpfile, which on some architectures can drastically reduce
893e0b
core file size. See /sbin/makedumpfile --help for a list of options.
893e0b
Note that the -i and -g options are not needed here, as the initrd
893e0b
will automatically be populated with a config file appropriate
893e0b
for the running kernel.
893e0b
.PP
893e0b
Note 1: About default core collector:
893e0b
The default core_collector for raw/ssh dump is:
893e0b
"makedumpfile -F -l --message-level 1 -d 31".
893e0b
The default core_collector for other targets is:
893e0b
"makedumpfile -l --message-level 1 -d 31".
893e0b
Even if core_collector option is commented out in kdump.conf, makedumpfile
893e0b
is the default core collector and kdump uses it internally.
893e0b
If one does not want makedumpfile as default core_collector, then they
893e0b
need to specify one using core_collector option to change the behavior.
893e0b
.PP
893e0b
Note 2: If "makedumpfile -F" is used then you will get a flattened format
893e0b
vmcore.flat, you will need to use "makedumpfile -R" to rearrange the
893e0b
dump data from standard input to a normal dumpfile (readable with analysis
893e0b
tools).
893e0b
ie. "makedumpfile -R vmcore < vmcore.flat"
893e0b
893e0b
.RE
893e0b
893e0b
.B kdump_post <binary | script>
893e0b
.RS
893e0b
This directive allows you to run a specified executable
893e0b
just after the vmcore dump process terminates.  The exit
893e0b
status of the current dump process is fed to the kdump_post
893e0b
executable as its first argument($1).  Executable can modify
893e0b
it to indicate the new exit status of succeeding dump process,
893e0b
.PP
893e0b
Note that scripts written for use with this directive must use
893e0b
the /bin/bash interpreter.
893e0b
.RE
893e0b
893e0b
.B kdump_pre <binary | script>
893e0b
.RS
893e0b
Works just like the "kdump_post" directive, but instead
893e0b
of running after the dump process, runs immediately
893e0b
before.  Exit status of this binary is interpreted
893e0b
as follows:
893e0b
.PP
893e0b
0 - continue with dump process as usual
893e0b
.PP
893e0b
non 0 - reboot the system
893e0b
.PP
893e0b
Note that scripts written for this directive must use
893e0b
the /bin/bash interpreter.
893e0b
.RE
893e0b
893e0b
.B extra_bins <binaries | shell scripts>
893e0b
.RS
893e0b
This directive allows you to specify additional
893e0b
binaries or shell scripts you'd like to include in
893e0b
your kdump initrd. Generally only useful in
893e0b
conjunction with a kdump_post binary or script that
893e0b
relies on other binaries or scripts.
893e0b
.RE
893e0b
893e0b
.B extra_modules <module(s)>
893e0b
.RS
893e0b
This directive allows you to specify extra kernel
893e0b
modules that you want to be loaded in the kdump
893e0b
initrd, typically used to set up access to
893e0b
non-boot-path dump targets that might otherwise
893e0b
not be accessible in the kdump environment. Multiple
893e0b
modules can be listed, separated by spaces, and any
893e0b
dependent modules will automatically be included.
893e0b
.RE
893e0b
603de6
.B failure_action <reboot | halt | poweroff | shell | dump_to_rootfs>
893e0b
.RS
893e0b
Action to perform in case dumping to the intended target fails. The default is "reboot".
893e0b
reboot: Reboot the system (this is what most people will want, as it returns the system
893e0b
to a normal state).  halt: Halt the system and lose the vmcore.  poweroff: The system
893e0b
will be powered down.  shell: Drop to a shell session inside the initramfs, from which
893e0b
you can manually perform additional recovery actions.  Exiting this shell reboots the
603de6
system by default or performs "final_action".
603de6
Note: kdump uses bash as the default shell.  dump_to_rootfs: If non-root dump
603de6
target is specified, the failure action can be set as dump_to_rootfs.  That means when
603de6
dumping to target fails, dump vmcore to rootfs from initramfs context and reboot
603de6
by default or perform "final_action".
603de6
.RE
603de6
603de6
.B default <reboot | halt | poweroff | shell | dump_to_rootfs>
603de6
.RS
603de6
Same as the "failure_action" directive above, but this directive is obsolete
603de6
and will be removed in the future.
603de6
.RE
603de6
603de6
.B final_action <reboot | halt | poweroff>
603de6
.RS
603de6
Action to perform in case dumping to the intended target succeeds.
603de6
Also performed when "shell" or "dump_to_rootfs" failure action finishes.
603de6
Each action is same as the "failure_action" directive above.
603de6
The default is "reboot".
893e0b
.RE
893e0b
893e0b
.B force_rebuild <0 | 1>
893e0b
.RS
893e0b
By default, kdump initrd will only be rebuilt when necessary.
893e0b
Specify 1 to force rebuilding kdump initrd every time when kdump service starts.
893e0b
.RE
893e0b
893e0b
.B force_no_rebuild <0 | 1>
893e0b
.RS
893e0b
By default, kdump initrd will be rebuilt when necessary.
893e0b
Specify 1 to bypass rebuilding of kdump initrd.
893e0b
893e0b
.PP
893e0b
force_no_rebuild and force_rebuild options are mutually exclusive and
893e0b
they should not be set to 1 simultaneously.
893e0b
.RE
893e0b
893e0b
.B override_resettable <0 | 1>
893e0b
.RS
893e0b
Usually an unresettable block device can't be a dump target. Specifying 1 means
893e0b
that even though the block target is unresettable, the user wants to try dumping anyway.
893e0b
By default, it's set to 0, which will not try something destined to fail.
893e0b
.RE
893e0b
893e0b
893e0b
.B dracut_args <arg(s)>
893e0b
.RS
893e0b
Kdump uses dracut to generate initramfs for second kernel. This option
893e0b
allows a user to pass arguments to dracut directly.
893e0b
.RE
893e0b
893e0b
893e0b
.B fence_kdump_args <arg(s)>
893e0b
.RS
893e0b
Command line arguments for fence_kdump_send (it can contain all valid
893e0b
arguments except hosts to send notification to).
893e0b
.RE
893e0b
893e0b
893e0b
.B fence_kdump_nodes <node(s)>
893e0b
.RS
893e0b
List of cluster node(s) except localhost, separated by spaces, to send fence_kdump notification
893e0b
to (this option is mandatory to enable fence_kdump).
893e0b
.RE
893e0b
893e0b
893e0b
.SH DEPRECATED OPTIONS
893e0b
893e0b
.B net <nfs mount>|<user@server>
893e0b
.RS
893e0b
net option is replaced by nfs and ssh options. Use nfs or ssh options
893e0b
directly.
893e0b
.RE
893e0b
893e0b
.B options <module> <option list>
893e0b
.RS
893e0b
Use KDUMP_COMMANDLINE_APPEND in /etc/sysconfig/kdump to add module options as
893e0b
kernel command line parameters. For example, specify 'loop.max_loop=1' to limit
893e0b
maximum loop devices to 1.
893e0b
.RE
893e0b
893e0b
.B link_delay <seconds>
893e0b
.RS
893e0b
link_delay was used to wait for a network device to initialize before using it.
893e0b
Now dracut network module takes care of this issue automatically.
893e0b
.RE
893e0b
893e0b
.B disk_timeout <seconds>
893e0b
.RS
893e0b
Similar to link_delay, dracut ensures disks are ready before kdump uses them.
893e0b
.RE
893e0b
893e0b
.B debug_mem_level <0-3>
893e0b
.RS
893e0b
Turn on verbose debug output of kdump scripts regarding free/used memory at
893e0b
various points of execution.  This feature has been
893e0b
moved to dracut now.
893e0b
Use KDUMP_COMMANDLINE_APPEND in /etc/sysconfig/kdump and
893e0b
append dracut cmdline param rd.memdebug=[0-3] to enable the debug output.
893e0b
893e0b
Higher level means more debugging output.
893e0b
.PP
893e0b
0 - no output
893e0b
.PP
893e0b
1 - partial /proc/meminfo
893e0b
.PP
893e0b
2 - /proc/meminfo
893e0b
.PP
893e0b
3 - /proc/meminfo + /proc/slabinfo
893e0b
.RE
893e0b
893e0b
.B blacklist <list of kernel modules>
893e0b
.RS
893e0b
blacklist option was recently being used to prevent loading modules in
893e0b
initramfs. General terminology for blacklist has been that module is
893e0b
present in initramfs but it is not actually loaded in kernel. Hence
893e0b
retaining blacklist option creates more confusing behavior. It has been
893e0b
deprecated.
893e0b
.PP
893e0b
Instead, use rd.driver.blacklist option on second kernel to blacklist
7a865b
a certain module. One can edit /etc/sysconfig/kdump and edit
893e0b
KDUMP_COMMANDLINE_APPEND to pass kernel command line options. Refer
893e0b
to dracut.cmdline man page for more details on module blacklist option.
893e0b
.RE
893e0b
893e0b
.RE
893e0b
893e0b
.SH EXAMPLES
893e0b
Here are some examples for core_collector option:
893e0b
.PP
893e0b
Core collector command format depends on dump target type. Typically for
893e0b
filesystem (local/remote), core_collector should accept two arguments.
893e0b
First one is source file and second one is target file. For ex.
893e0b
.TP
893e0b
ex1.
893e0b
core_collector "cp --sparse=always"
893e0b
893e0b
Above will effectively be translated to:
893e0b
893e0b
cp --sparse=always /proc/vmcore <dest-path>/vmcore
893e0b
.TP
893e0b
ex2.
893e0b
core_collector "makedumpfile -l --message-level 1 -d 31"
893e0b
893e0b
Above will effectively be translated to:
893e0b
893e0b
makedumpfile -l --message-level 1 -d 31 /proc/vmcore <dest-path>/vmcore
893e0b
.PP
893e0b
For dump targets like raw and ssh, in general, core collector should expect
893e0b
one argument (source file) and should output the processed core on standard
893e0b
output (There is one exception of "scp", discussed later). This standard
893e0b
output will be saved to destination using appropriate commands.
893e0b
893e0b
raw dumps examples:
893e0b
.TP
893e0b
ex3.
893e0b
core_collector "cat"
893e0b
893e0b
Above will effectively be translated to.
893e0b
893e0b
cat /proc/vmcore | dd of=<target-device>
893e0b
.TP
893e0b
ex4.
893e0b
core_collector "makedumpfile -F -l --message-level 1 -d 31"
893e0b
893e0b
Above will effectively be translated to.
893e0b
893e0b
makedumpfile -F -l --message-level 1 -d 31 | dd of=<target-device>
893e0b
.PP
893e0b
ssh dumps examples
893e0b
.TP
893e0b
ex5.
893e0b
core_collector "cat"
893e0b
893e0b
Above will effectively be translated to.
893e0b
893e0b
cat /proc/vmcore | ssh <options> <remote-location> "dd of=path/vmcore"
893e0b
.TP
893e0b
ex6.
893e0b
core_collector "makedumpfile -F -l --message-level 1 -d 31"
893e0b
893e0b
Above will effectively be translated to.
893e0b
893e0b
makedumpfile -F -l --message-level 1 -d 31 | ssh <options> <remote-location> "dd of=path/vmcore"
893e0b
893e0b
There is one exception to standard output rule for ssh dumps. And that is
893e0b
scp. As scp can handle ssh destinations for file transfers, one can
893e0b
specify "scp" as core collector for ssh targets (no output on stdout).
893e0b
.TP
893e0b
ex7.
893e0b
core_collector "scp"
893e0b
893e0b
Above will effectively be translated to.
893e0b
893e0b
scp /proc/vmcore <user@host>:path/vmcore
893e0b
893e0b
.PP
893e0b
examples for other options please see
893e0b
.I /etc/kdump.conf
893e0b
893e0b
.SH SEE ALSO
893e0b
893e0b
kexec(8) mkdumprd(8) dracut.cmdline(7)