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