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