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