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