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
ab224c
this file and do not want to restart before it takes effect, restart
ab224c
the kdump service to rebuild to initrd.
ab224c
ab224c
For most configurations, you can simply review the examples provided
ab224c
in the stock /etc/kdump.conf.
ab224c
ab224c
.B NOTE: 
ab224c
For filesystem dump 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
ab224c
Will mount fs and copy /proc/vmcore to <mnt>/var/crash/%HOST-%DATE/,
ab224c
supports DNS. Note that a fqdn should be used as the server name in the 
ab224c
mount point
ab224c
.RE
ab224c
ab224c
.B ssh <user@server>
ab224c
.RS
ab224c
Will scp /proc/vmcore to <user@server>:/var/crash/%HOST-%DATE/,
ab224c
supports DNS. NOTE: make sure user has necessary write permissions on
ab224c
server and that a fqdn is used as the server name
ab224c
.RE
ab224c
ab224c
.B sshkey <path>
ab224c
.RS
ab224c
Specifies the path of the ssh key you want to use when do ssh dump,
ab224c
the default value is /root/.ssh/kdump_id_rsa.
ab224c
.RE
ab224c
ab224c
.B <fs type> <partition>
ab224c
.RS
ab224c
Will mount -t <fs type> <partition> /mnt and copy /proc/vmcore to
ab224c
/mnt/var/crash/%DATE/.  NOTE: <partition> can be a device node, label
ab224c
or uuid.  It's recommended to use persistent device names such as
ab224c
/dev/vg/<devname>. Otherwise it's suggested to use label or uuid.
ab224c
.RE
ab224c
ab224c
.B path <path>
ab224c
.RS
ab224c
Append path to the filesystem device which you are dumping to.
ab224c
Ignored for raw device dumps.  If unset, will default to /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.
ab224c
You could use the dump filtering program makedumpfile, the default one,
ab224c
to retrieve your core, which on some arches can drastically reduce
ab224c
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:
ab224c
Default core_collector for raw/ssh dump is:
765b01
"makedumpfile -F -l --message-level 1 -d 31".
ab224c
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
ab224c
is 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
ab224c
dump data from stdard 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
ab224c
This directive allows you to run a specified
ab224c
executable just after the memory dump process
ab224c
terminates. The exit status from the dump process
ab224c
is fed to the kdump_post executable, which can be
ab224c
used to trigger different actions for success or
ab224c
failure.
ab224c
.PP
ab224c
Note that scripts written for use with this
ab224c
directive must use the /bin/bash interpreter
ab224c
.RE
ab224c
ab224c
.B kdump_pre <binary | script>
ab224c
.RS
ab224c
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
ab224c
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
ab224c
modules can be listed, separated by a space, and any
ab224c
dependent modules will automatically be included.
ab224c
.RE
ab224c
ab224c
.B default <reboot | halt | poweroff | shell | dump_to_rootfs>
ab224c
.RS
ab224c
Action to preform in case dumping to intended target fails. If no default
ab224c
action is specified, "reboot" is assumed default.
ab224c
reboot: If the default action is reboot simply reboot the system (this is what
ab224c
most people will want, as it returns the system to a nominal state).  shell: If the default
ab224c
action is shell, then drop to an shell session inside the initramfs from
ab224c
where you can manually preform additional recovery actions.  Exiting this shell
ab224c
reboots the system.  halt: bring the system to a halt, requiring manual reset
ab224c
poweroff: The system will be powered down. dump_to_rootfs:If the default action
ab224c
is dump_to_rootfs, specified root will be mounted and dump will be saved in "path"
ab224c
directory.
ab224c
Note: kdump uses bash as the default shell.
ab224c
.RE
ab224c
ab224c
.B force_rebuild <0 | 1>
ab224c
.RS
ab224c
By default, kdump initrd only will 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
ab224c
Usually a unresettable block device can't be dump target. Specifying 1 means
ab224c
though block target is unresettable, user understand this situation and want
ab224c
to try dumping. By default, it's set to 0, means not to try a destined failure.
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
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
ab224c
Use KDUMP_COMMANDLINE_APPEND in /etc/sysconfig/kdump to add proper
ab224c
module option as kernel command line params. Such as append loop.max_loop=1
ab224c
to limit maximum loop devices to 1.
ab224c
.RE
ab224c
ab224c
.B link_delay <seconds>
ab224c
.RS
ab224c
link_delay was used to wait a network device to initialize before using it.
ab224c
Now dracut network module take care of this issue automaticlly.
ab224c
.RE
ab224c
ab224c
.B disk_timeout <seconds>
ab224c
.RS
ab224c
Similar to link_delay, dracut ensures disks being ready before kdump uses them.
ab224c
.RE
ab224c
ab224c
.B debug_mem_level <0-3>
ab224c
.RS
ab224c
This was used to turns on debug/verbose output of kdump scripts regarding
ab224c
free/used memory at 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
ab224c
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
ab224c
Here is 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)