Contact
Impressum
Why this name?
pdf

KDUMP

NAME
kdump − Configuration of kdump

SYNOPSIS
/etc/sysconfig/kdump

DESCRIPTION
This configuration file provides various options for the kdump loading and saving process. It´s mostly read by kdumptool(8) but also by the kdump init script.

OPTIONS
The file format consists of shell variables (which means that the configuration file is actually parsed by a sh(1) compatible shell) that are described below. It´s recommended to use a pair of double quotes to assign values to that variables.

KDUMP_KERNELVER
Kernel Version string for the −kdump kernel, such as "2.6.25−5−kdump". The init script will use a kernel named /boot/vmlinu[zx]−$KDUMP_KERNELVER. Using "kdump" will default to the most recently installed kdump kernel (to which the symbolic link /boot/vmlinuz−kdump points).

If no version is specified, then the init script will try to find a kdump kernel with the algorithm described below.

Default is "" which means that the auto−detection described above is used.

Kernel auto-detection

Let´s assume that a kernel name KERNELRELEASE consists of BASEVERSION and a FLAVOUR on SUSE. For example consider the kernel release ("uname −r") "2.6.25.18−0.2−default". Then the BASEVERSION is "2.6.25.18−0.2" (but there are also BASEVERSION strings without a dash) and the FLAVOUR is "default".

To find out if a kernel is suitable as capture kernel, there are strong and weak requirements. The strong requirements mean that you just cannot use the kernel as kdump kernel:

• Either the kernel must be a special kdump kernel with a modified start address or

• the kernel is relocatable.

The weak requirements mean that a kernel is not good as kdump kernel so it should be avoided when better kernels are installed. A kernel does not fulfil that weak requirements when

• It is a realtime kernel (since the interrupt handling is different and irqpoll has problems) or

• the kernel is compiled for a huge number of CPUs (above 1024 in our case) since that means that the capure kernel needs more memory.

After all that definition, the algorithm tries following kernels in that order:

1. BASEVERSION−kdump (e.g. /boot/vmlinuz−2.6.27−rc1−kdump)

2. kdump (e.g. /boot/vmlinuz−kdump)

3. KERNELRELEASE (e.g. /boot/vmlinuz−2.6.27−rc1−kdump), strong check

4. BASEVERSION−default (e.g. /boot/vmlinuz−2.6.27−rc1−default), strong check

5. "" (e.g. /boot/vmlinuz), strong check

6. KERNELRELEASE (e.g. /boot/vmlinuz−2.6.27−rc1−kdump), weak check

7. "" (e.g. /boot/vmlinuz), weak check

On each item, it tries:

1. /boot/*vmlinuz

2. /boot/*vmlinux

Initrd

For the initrd, if the kernel name already contains "kdump", then the initrd /boot/initrd−<kernelver> is used. Else, we use /boot/initrd−<kernelver>−kdump (the kernel flavour is not replaced, so for example this means /boot/initrd−2.6.25.9−0.2−default−kdump. This is because the initrd used for kdump always has to be special, and it makes no sense to load the normal initrd that would not save the dump.

KDUMP_COMMANDLINE
Command line used to boot the kdump kernel. By default, the /etc/init.d/kdump script tries to build a command line automatically from the command line of the running system, preserving root partition, serial console, etc. If you manually create a command line, make sure to include:

• the root parameter,

• any console parameters (for serial console),

maxcpus=1,

irqpoll,

reset_devices,

elevator=deadline to save the memory footprint.

The last three parameters are special for kdump and should always be included, if you don´t have a good reason to exclude them.

If you just want have an own command line parameter to be added additionally, use KDUMP_COMMANDLINE_APPEND.

Default is "".

KDUMP_COMMANDLINE_APPEND
This variable describes all command line parameters that are passed to the kdump kernel additionally to the default parameters. See also KDUMP_COMMANDLINE.

Default is "".

KEXEC_OPTIONS
Additional options for kexec(8).

Default is "" except on IA64 where it is "−−noio".

MAKEDUMPFILE_OPTIONS
Additional options for makedumpfile(8). makedumpfile will be used to save the dump if KDUMP_DUMPLEVEL is non−zero or KDUMP_DUMPFORMAT is not ELF. Normally, you don´t have to specify any options here, but you may be asked in Bugzilla to add the −D option for debugging.

Default is "".

KDUMP_IMMEDIATE_REBOOT
Immediately reboot after saving the core in the kdump kernel? Use "yes" or "no".

Default is "yes".

KDUMP_TRANSFER
A script or command executed to process and transfer the dump image. It can read the dump image either via /proc/vmcore or /dev/oldmem. Most other variables will have no effect if you use a custom command here.

It´s important that all requirements including that script itself are included in KDUMP_REQUIRED_PROGRAMS.

It´s strongly recommended that the default mechanism is used, it should provide everything that is needed, together with KDUMP_PRESCRIPT and KDUMP_POSTSCRIPT. We can´t support problems with using that variable.

KDUMP_PRESCRIPT and KDUMP_POSTSCRIPT are not executed if KDUMP_TRANSFER is set.

Default: "".

KDUMP_SAVEDIR
The directory where dumps are saved to. If the directory does not exist, it will be created. The directory is a URL and must conform to the syntax described in the section "URL FORMAT" below. If the directory does not exist, it will be created. (That is true for all targets, even network targets. Of course the user must have the permission to create directories.)

Below that directory, for each dump a directory with a time stamp in the following format will be created: "YYYY−MM−TT−HH:MM". That directory contains the dump and various other files, depending which dump target will be used and which dump settings are made.

If KDUMP_COPY_KERNEL is set, that directory will also contain the kernel.

Default: "file:///var/log/dump".

KDUMP_KEEP_OLD_DUMPS
Number of old dumps to keep. That variable is only honored on local directories (i.e., if KDUMP_SAVEDIR starts with file) because we think it´s bad from a security point of view if other hosts delete stuff (that may be from another hosts) on a dump server. The deletion process takes place before the dumps are saved. So if you specify 3 here, then after the dump has been saved, 4 dumps are on disk.

Set that variable to "0" to disable the deletion of dumps entirely, and set that variable to "−1" to delete all dumps, i.e. then only the just saved dump is on disk.

Default: "5"

KDUMP_FREE_DISK_SIZE
Don´t save the dump (or delete it afterwards) if after saving the dump less than KDUMP_FREE_DISK_SIZE megabytes are free. Because when dump compression or dump filtering (see KDUMP_DUMPLEVEL and KDUMP_DUMPFORMAT) is used, we don´t know in advance how large the dump will be, we have to delete the dump after saving it.

That option applies only to local file systems, i.e. KDUMP_SAVEDIR must start with file.

Default: "64"

KDUMP_VERBOSE
Bit mask of several options that set the verbosity of the dump process. To apply several options, you have to add their value. The options are:

1

kdump command line is written to system log when executing /etc/init.d/kdump.

2

Progress is written to stdout while dumping.

4

kdump command line is written so standard output when executing /etc/init.d/kdump.

8

Debugging for kdump transfer mechanism. That is executed in initrd and generates lots of output. However, it´s very useful if something does not work.

16

Debugging when loading the kdump kernel. That creates lots of output to stdout, so only use if you really want to debug that. It is useful if kdump reports that it cannot find a suitable kernel but you think kdump is wrong.

So, for example, if you want to have the command line on stdout when loading the kernel and also in the system log, just use KDUMP_VERBOSE = 5 (i.e. 1 + 4).

Default: "3".

KDUMP_DUMPLEVEL
Determines the dump level. If KDUMP_DUMPLEVEL is non−zero, then makedumpfile(8) is used to strip pages that may not be necessary for analysing. 0 means no stripping, and 31 is the maximum dump level, i.e. 0 produces the largest dump files and 31 the smallest.

The following table from makedumpfile(8) shows what each dump level means:

img

Default: "0"

KDUMP_DUMPFORMAT
This variable specifies the dump format.

ELF

ELF has the advantage that it´s a standard format and GDB can be used to analyse the dumps. The disadvantage is that the dump files are larger.

compressed

compressed is the kdump compressed format that produces small dumps, see makedumpfile(8). However, only crash(8) can analyse the dumps and makedumpfile must be installed (but you need it anyway if you set KDUMP_DUMPLEVEL to non−zero before).

Default: "compressed"

KDUMP_CONTINUE_ON_ERROR
If something goes wrong while saving the dump or deleting old dumps in initrd, then kdumptool(8) normally just tries to execute the next action. However, it can be usedful to open a shell at that point of time to fix the problem or just debug it, therefore you can set KDUMP_CONTINUE_ON_ERROR to "true".

Default: "false"

KDUMP_REQUIRED_PROGRAMS
This is a space−separated list of programs (full path) that are required by KDUMP_TRANSFER, KDUMP_PRESCRIPT or KDUMP_POSTSCRIPT. Dynamic libraries that are required by that programs don´t have to be included as they are resolved automatically. However, it´s necessary to include other runtime requirements because it´s not possible to resolve them automatically.

Default: ""

KDUMP_PRESCRIPT
Program that is executed before taking the dump. You have to include that program in KDUMP_REQUIRED_PROGRAMS.

Default: ""

KDUMP_POSTSCRIPT
Program that is executed after taking the dump and before the system is rebooted. You have to include that program in KDUMP_POSTSCRIPT.

Default: ""

KDUMP_COPY_KERNEL
Not only copy the dump to KDUMP_SAVEDIR but also the installed kernel. Valid values are "yes" and "no". If you want to have the debugging information also copied, which is required to open the program, you also have to install the kernel−<flavour>−debuginfo package.

Modules are not copied, only the kernel image and the debugging file.

Default: "yes"

KDUMPTOOL_FLAGS
This is a space−separated list of flags to tweak the run−time behaviour of kdumptool(8). Currently, only one flag is supported:

NOSPARSE

Disable the creation of sparse−files. This flag is for debugging purposes, e.g. if the file system or network protocol has problems with sparse files. Because SFTP and FTP are not mounted, that option has no meaning when saving the dump to SFTP and FTP.

Default: ""

KDUMP_NETCONFIG
Network configuration for kdump. Because the dump process runs in initrd, the network configuration is different from the normal network configuration. Use auto to auto−detect the network configuration, this is also the default.

Use a netdevice:mode string to force a specific network device to be used. A netdevice is for example "eth0". The mode can be either "dhcp" or "static". If you use "static", you have to set the IP address with ip=ipspec. ipspec is <client>:<server>:<gateway>:<netmask>:<hostname>:<device>:<proto>. See mkinitrd(8) for details.

You can set KDUMP_NETCONFIG to "" if you want no network in initrd, i.e. you use disk dumping.

Default: "auto"

KDUMP_SMTP_SERVER
If you want to get an email after the dump has been copied, you can specify an SMTP server here. It´s valid to specify a hostname, an IP address. Optionally, you can also specify a port with the usual :port syntax.

Example: smtp.myprovider.de:25

If you provide a username (KDUMP_SMTP_USER) and a password (KDUMP_SMTP_PASSWORD), then SMTP AUTH will be used. Otherwise, plain SMTP with no authentication will be used.

Default: ""

KDUMP_SMTP_USER
Username used for SMTP authentication. Also specify KDUMP_SMTP_PASSWORD in that case. If no username and/or no password will be provided, plain SMTP will be used.

Default: ""

KDUMP_SMTP_PASSWORD
Password used for SMTP authentication. Also specify KDUMP_SMTP_USER in that case. If no username and/or no password will be provided, plain SMTP will be used.

Default: ""

KDUMP_NOTIFICATION_TO
Email address where notification mails should be sent to. Don´t specify a real name here, only an email address. You have to configure a SMTP server with KDUMP_SMTP_SERVER to use that feature.

Example: john@myprovider.de

Default: ""

KDUMP_NOTIFICATION_CC
Space−separated list of email addresses where notification mails should be sent to via Cc. Don´t specify real names here, only email addresses. You have to configure a SMTP server with KDUMP_SMTP_SERVER to use that feature.

Example: "john@myprovider.de doe@myprovider.de"

Default: ""

URL FORMAT
In general, the URL format is

protocol://specification

where protocol is one of:

file,

ftp,

sftp (aliases are ssh or scp),

nfs

cifs (alias is smb).

The specification varies for each protocol.

Local files (file)
That type describes a local path.

Format: file://]path

As shown, the file prefix is optional, i.e. a simple path is still valid. The path must start with a leading slash (/), i.e. only absolute paths are allowed.

Examples:

• /var/log/dump

• file:///var/log/dump

File Transfer Protocol (ftp)
This URL type is used to specify paths on a remote FTP server.

Format: ftp:// [ user [:password]@ ] hostname [:port] ] path

The remote user is optional, if no user is specified, anonymous FTP is assumed. Even if a username is specified, the password is optional, if no password is specified, an empty password is used. When the username is "anonymous", then "$USER@$HOSTNAME" is used as password because some FTP servers deny anonymous FTP with empty passwords.

hostname can be either a (DNS−)resolvable hostname, with or without a domain name, or an IP address in totted decimal format. port can be used to specify the remote port, if no port is specified in the URL, the default FTP port is used. Finally, path must conform to the same rules as for local files (see above).

Examples:

• ftp://neptunium/var/log/dump

• ftp://bwalle@neptunium.suse.de/var/log/dump

• ftp://bwalle:dontsay@strauss.suse.de:123/var/log/dump

• ftp://192.168.0.70/var/log/dump

Secure File Transfer Protocol (sftp)
This URL type is used to specify paths on a remote server that is reachable via SFTP. It´s important that an SFTP server must be running (which is the default on SUSE), the kdumptool does not use FISH (FIles transferred over SHell protocol).

Format: sftp:// [ user [:password]@ ] hostname [:port] ] path

It´s valid to use the alias "ssh" or "scp" as alias for "sftp" (for backward compatibility), but the "sftp" prefix is recommended.

For the elements, see the description of FTP above. Please note that the use of an password here is not recommended. The recommended way is to add the key where the file should be copied to to the "authorized_keys" file of the user where the dump is saved. For example, if you want to save the dump to the "kdump" user of the machine "collector", then generate a private/public key pair on the machine that saves the dump with ssh−keygen −t dsa. Append the file id_dsa.pub (in root/.ssh/) to ~dump/.ssh/authorized_keys on "collector".

root@earth:~# ssh−keygen −t dsa
...
root@earth:~# cat /root/.ssh/id_dsa.pub \
| ssh kdump@collector "cat − >> /root/.ssh/authorized_keys"

Don´t use any password to encrypt the key. kdumptool is designed to be used non−interactively.

Examples:

• sftp://kdump@collector:22/var/log/dump

• sftp://neptunium/var/log/dump

• scp://neptunium/var/log/dump

Network File System (nfs)
NFS is used to specify remote hosts that export their file system via NFS. NFS doesn´t use username and password. Also, the URL format cannot be used to specify options. As default, the nolock option is used.

Format: +nfs://host [:port:] _path

host is the hostname, port is optional (should not be used, it is only implemented for completeness with the other URL formats). path specifies the path that is exported via NFS in /etc/exports (or a subdirectory of a path that is exported).

Examples:

• nfs://neptunium/var/log/dump

• nfs://10.10.2.120/var/log/dump

Common Internet File System (cifs)
CIFS is used to specify remote hosts that export a file system via CIFS, also known as SMB (although they are technically different, CIFS is the successor of SMB). This could be a Microsoft Windows server, or a Samba Server running on Unix or MacOS.

Format: +cifs:// [user [:password] @] host path

Although it´s technically not 100 % correct, smb is used as an alias for cifs, so the program will always return cifs even if you specify smb.

The parts of the URL are described in the FTP section above.

Note: You have to use the slash as path separator, not the backslash as on Microsoft Windows.

Examples:

• cifs://neptunium/var/log/dump

• cifs://bwalle:dontsay@neptunium:/var/log/dump

• smb://bwalle@192.168.0.70:/var/log

BUGS
Please report bugs and enhancement requests at https://bugzilla.novell.com.

COPYING
Copyright (c) 2008 Bernhard Walle <bwalle@suse.de>. Free use of this software is granted under the terms of the GNU General Public License (GPL), version 2 or later.

SEE ALSO
kexec
(8), kdump(5), makedumpfile(8), mkdumprd(8) http://en.opensuse.org/Kdump

pdf
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

No Banana Union - No Software Patents