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