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