kdump-tools.conf(5)
π kdump-tools.conf β the manual page, but make it make sense π
okay bestie, so this is the kdump-tools.conf(5) page from the Linux System Administrator's Manual. It's a config file situation. It's giving "tiny file, big consequences." Let's go. π¦
β¨ NAME β¨
kdump-tools.conf β literally just the configuration file for the kdump-tools init script. That's it. That's the whole job. π
πΈ SYNOPSIS πΈ
/etc/default/kdump-tools
One path. One file. Iconic.
π DESCRIPTION π
So kdump-tools is the thing that manages the kdump feature of the Linux kernel β you know, the part where if your kernel has a whole crisis, it kexecs into a lil baby kernel and grabs the dying kernel's memory so you can actually debug what happened instead of just sobbing. π
The /etc/default/kdump-tools file is where your local configuration settings for kdump live. Your little home base. π
β οΈ important bestie: this file gets sourced into a shell script. It's not a fancy parsey config format. So its format should be consistent with shell scripting. Write it like shell or it will simply not vibe with you. no cap.
π OPTIONS π
okay this is the long part, get comfy, grab a snack π
USE_KDUMPβ the big on/off switch. Controls whetherkdump-toolsdoes literally anything at all. If it's not set, or it's0, thekdump-toolsinit script will not run. periodt.KDUMP_KERNELβ a full pathname to a kdump kernel. This is the kernel that getskexec'd at crash time into a reserved memory area, exposing the old kernel's memory for dumping. If you don't set it,kdump-configwill use the boot kernel as the kdump kernel if it's relocatable β otherwise you must setKDUMP_KERNELor kdump-tools straight up will not work. πKDUMP_INITRDβ full pathname to the kdump initrd (if you're using one). But listen: ifKDUMP_KERNELis set andKDUMP_INITRDis not set, a warning message gets printed and an initrd will not be used. heads up. πKDUMP_INITRD_GENERATORβ picks the tool that builds the kdump capture initrd. If it's unset or set toauto, the capture initrd gets built withdracutwhen dracut is installed, and withmkinitramfsfrominitramfs-toolsotherwise. Or you can force it β set it todracutorinitramfs-toolsto lock in a specific generator regardless of what's installed. choose your fighter. π₯KDUMP_COREDIRβ full path to the directory where the vmcore gets saved. Date-stamped subdirectories get created each time a vmcore file is processed. If you don't set it,/var/crashis used. classic.KDUMP_FAIL_CMDβ the command to run if the vmcore save fails. If you don't set it, no special action is taken β it just... doesn't save. π«KDUMP_DUMP_DMESGβ controls whether the dmesg buffer gets dumped. If it's not set, or set to1, the dmesg buffer is dumped. If set to0, it is not dumped.KDUMP_NUM_DUMPSβ how many dump files you want to keep on the local machine. If it's not set or set to0, no special action is taken. If it's set to>1and there are too many dump files hangin around, older dumps get removed. The cleanup only happens after a successful dump β not before, we're not reckless. Also this variable is ignored if remote dumping is enabled. read that again bestie. πMAKEDUMP_ARGSβ extra arguments passed tomakedumpfile(8). If you don't set it,"-c -d 31"is used. That tellsmakedumpfileto use compression and reduce the corefile to in-use kernel pages only. Go readmakedumpfile(8)for the details, iykyk.KDUMP_KEXEC_ARGSβ additional arguments for thekexeccommand that's used to load the kdump kernel.KDUMP_CMDLINEβ normally the current kernel commandline is grabbed from/proc/cmdline. Set this variable to override/proc/cmdline. main character energy: you're taking over. β¨KDUMP_CMDLINE_APPENDβ additional arguments appended to the command line for the kdump kernel. If not set,"reset_devices systemd.unit=kdump-tools-dump.service nr_cpus=1 irqpoll usbcore.nousb"is used. long default, but it's doing the most for a reason.SSHβ username and hostname of the remote server that'll receive the dump and dmesg files. You must useusername@hostnameformat. no negotiating.SSH_KEYβ full path of the ssh private key used to log into the remote server. Usekdump-config propagateto send the public key over to the remote server. If you don't set it, the default/root/.ssh/kdump_id_rsais used.HOSTTAGβ picks whether the hostname or the IP address gets used as a prefix to the timestamped directory when sending files to the remote server. If not set,"ip"is used.NFSβ hostname and mount point of the NFS server configured to receive the crash dump. Syntax must beHOSTNAME:MOUNTPOINT(e.g.remote:/var/crash). don't forget the colon. π
π USAGE π
okay so at this point kdump-tools is about as automated as it can be, but there are still prerequisites to using it, and some manual configuration is still required. sorry bestie, no fully-hands-off situation yet. π
By default, kernel dumps get stored locally on the system. But kdump-tools can also be configured to store kernel dumps on a remote server accessible through the network. options, we love options.
π§ Manual Configuration π§
USE_KDUMPis set to0by default. To enable kdump-tools, edit the/etc/default/kdump-toolsconfiguration file and setUSE_KDUMP=1. that's the unlock. π- Kernel command line parameters β the kernel must be booted with a
crashkernel=command line parameter. Some examplecrashkernelparameters:
ia64: crashkernel=384M
x86: crashkernel=128M
x86_64: crashkernel=256M
Some users may also want to add nmi_watchdog=1 on certain systems. The nmi watchdog will cause the kernel to panic (and kdump) if a system hang is detected. chaotic but useful. π
The kernel command line parameter is generally set in one of these files: /etc/default/grub, /boot/grub/menu.lst, /etc/elilo.conf, or /etc/lilo.conf. And if you change the command line parameter, a reboot is required for it to take effect. sorry. π
- Architectural considerations
A) x86 && PAE && memory > 4 Gigabytes β use KDUMP_KEXEC_ARGS="--elf64-core-headers"
B) x86 and x86_64 β some systems can take advantage of the nmi watchdog. Add nmi_watchdog=1 to the boot commandline to turn on the watchdog. The nmi interrupt will call panic if activated.
C) ia64 β some systems may need KDUMP_KEXEC_ARGS="--noio". Use this if the system hangs after a panic, but before the kdump kernel begins to boot.
π¦ Networked kernel dump Configuration π¦
- Either use SSH or NFS to choose which protocol to use to remotely access the target server. pick a lane. πΈ
- For SSH,
username@hostnameneeds to be provided along with an appropriateSSH_KEYdefinition β or usekdump-config propagateto propagate a new default ssh key. - For NFS, the remote server name must be provided along with the directory where files are to be copied.
π Prerequisites π
- Boot Kernel Configuration β the boot kernel must be configured with
CONFIG_KEXEC=yand, if it's also going to be used as the kdump kernel,CONFIG_CRASHDUMP=y.
For ia64, only makedumpfile level 1 will work if the memory model selected is CONFIG_DISCONTIG. CONFIG_SPARSEMEM is recommended instead. do that instead, fr fr.
- Kdump Kernel Configuration β the kdump kernel must be relocated or relocatable. ia64 is relocatable by default, but x86, x86_64, and powerpc must be built with
CONFIG_RELOCATABLE=y. Other architectures may require a predetermined start location viaCONFIG_PHYSICAL_START. (typo in the original says "predermined" but you get it, we're being cute not pedantic β actually no, we repeat it as written,CONFIG_PHYSICAL_STARTblah blah β anyway, moving on. π )
If the boot kernel is relocatable, kdump-tools will automatically use that kernel. Otherwise, a relocatable or relocated kernel will need to be provided. The kdump kernel can be specified in the /etc/default/kdump-tools file. Set the KDUMP_KERNEL variable and, if necessary, the KDUMP_INITRD variable, to point to the provided kernel and its initrd.
The kdump kernel must be configured with: CONFIG_CRASH_DUMP=y
π©· SYSCTLS π©·
Right now, kdump-tools automatically sets the kernel sysctl for panic on oops, so it can collect a dump in that case. If you want more panic triggers β like panic on OOM, or when a NMI is detected β it's recommended that you edit the sysctl configuration files (/etc/sysctl.conf or files in /etc/sysctl.d) to do that, and/or apply the sysctl settings with the sysctl tool. your kernel, your rules. β¨
π Sysctl handling during a kdump π
kdump-tools lets you configure sysctl overrides on the kdump environment β this is especially useful to stop sysctls from the regular boot from messing with the resource-impaired kdump environment. like leave her alone, she's going through it. π
The mechanism is restricted to kdump boot and will not affect regular boots. To add overrides, edit the file /etc/kdump/sysctl.conf.
By default, hugepages overrides are set, and it's highly recommended to keep them in the file β otherwise you risk kdump out-of-memory conditions. so. keep them. please. π₯Ί
β EXAMPLES β
Use this option on x86 systems with PAE and more than 4 gig of memory:
KDUMP_KEXEC_ARGS="--elf64-core-headers"
This option starts a shell if kdump-tools cannot save the vmcore file:
KDUMP_FAIL_CMD="/bin/bash; reboot -f"
π FILES π
/etc/init.d/kdump-toolsβ an init script to automatically load a kdump kernel, or save a vmcore and reboot./etc/default/kdump-toolsβ the kdump-tools configuration file/etc/kdump/sysctl.confβ kdump-tools sysctl override file/var/crash/kernel_linkβ a link to the current debug kernel/var/crash/kexec_cmdβ the lastkexec_cmdexecuted bykdump-config
π DIAGNOSTICS π
See kdump-config(8) for explanations of the various error messages. that's where the answers live, bestie.
π SEE ALSO π
/usr/share/doc/kdump-tools/README/usr/share/doc/kdump-tools/README.Debiankdump-config(8),kexec(8),sysctl(8),makedumpfile(8),crash(8),gdb(1)
πΈ AUTHOR πΈ
Terry Loftin <terry.loftin@hp.com>
okay that's the whole page!! β¨ this was kdump-tools v1.6.7-2, dated Jul 2020, and it's the kdump-tools.conf(5) page from the Linux System Administrator's Manual. go forth and dump your kernels responsibly. love u, bye!! π«Άππ
π¦ where this page comes from
- ubuntu stonking: kdump-tools 1:1.10.7ubuntu5
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms