TEXTDUMP(4)
πΎ NAME πΎ
okay bestie, this is the TEXTDUMP(4) page from the Kernel Interfaces Manual β and itβs literally about the textdump kernel dumping facility. π«Ά
β¨ SYNOPSIS β¨
options DDB
options KDB
options TEXTDUMP_PREFERRED
options TEXTDUMP_VERBOSE
π«Ά DESCRIPTION π«Ά
so the textdump facility lets you capture kernel debugging info to disk in a human-readable form instead of the machine-readable form normally used with kernel memory dumps and minidumps. itβs giving βdebugging info but make it readable.β π
this representation is less complete because it does not capture full kernel state β but it can provide debugging information in a more compact, portable, and persistent form than a traditional dump. no cap. β¨
and when you combine textdump with other ddb(4) facilities β like scripting and output capture β detailed bug information can be captured in a fully automated manner. obsessed. π
π¦ FORMAT π¦
textdump data is stored in a dump partition in the same style as a regular memory dump, and it will be automatically extracted by savecore(8) if present on boot. π¦
textdump files are stored in the tar(5) format, and they consist of one or more text files, each storing a particular type of debugging output. the following parts may be present:
ddb.txtβ capturedddb(4)output, if the capture facility has been used. may be disabled by clearing thedebug.ddb.textdump.do_ddbsysctl.config.txtβ kernel configuration, ifoptions INCLUDE_CONFIG_FILEhas been compiled into the kernel. may be disabled by clearing thedebug.ddb.textdump.do_configsysctl.msgbuf.txtβ kernel message buffer, including recent console output if the capture facility has been used. may be disabled by clearing thedebug.ddb.textdump.do_msgbufsysctl.panic.txtβ kernel panic string, if the kernel panicked before the dump was generated. may be disabled by clearing thedebug.ddb.textdump.do_panicsysctl.version.txtβ kernel version string. may be disabled by clearing thedebug.ddb.textdump.do_versionsysctl.
kernel textdumps may be extracted using tar(1). π§
βοΈ CONFIGURATION βοΈ
the textdump facility is enabled as part of the kernel debugger using options KDB and options DDB. by default, kernel dumps generated on panic or via explicit requests for a dump will be regular memory dumps β but you can change that energy. π
by using the textdump set command in ddb(4), or by setting the debug.ddb.textdump.pending sysctl to 1 using sysctl(8), itβs possible to request that the next dump be a textdump. one may also directly trigger a textdump in ddb(4) by running the command textdump dump.
if youβre at the ddb(4) command line, the commands textdump set, textdump status, and textdump unset may be used to set, query, and clear the textdump pending flag. πΈ
as with regular kernel dumps, a dump partition must be automatically or manually configured using dumpon(8).
additional kernel config(8) options:
TEXTDUMP_PREFERREDβ sets textdumps to be the default manner of doing dumps. this means there will be no need tosysctl(8)or use thetextdump setddb(8)commands.TEXTDUMP_VERBOSEβ will have the textdump facility be more verbose about each file it is emitting as well as other diagnostics useful to debug the textdump facility itself.
π EXAMPLES π
in the following example, the script kdb.enter.panic will run when the kernel debugger is entered as a result of a panic, enable output capture, dump several useful pieces of debugging information, and then invoke panic in order to force a kernel dump to be written out followed by a reboot:
script kdb.enter.panic=textdump set; capture on; show allpcpu; bt; ps; alltrace; show alllocks; textdump dump; reset
in the following example, the script kdb.enter.witness will run when the kernel debugger is entered as a result of a witness violation, printing lock-related information for the user:
script kdb.enter.witness=show locks
these scripts may also be configured using the ddb(8) utility. β¨
π SEE ALSO π
tar(1), ddb(4), tar(5), ddb(8), dumpon(8), savecore(8), sysctl(8)
π°οΈ HISTORY π°οΈ
the textdump facility first appeared in FreeBSD 7.1. π
π AUTHORS π
the textdump facility was created by Robert N. M. Watson. iconic. π
πΈ sign-off: this page is from Debian, dated October 18, 2019, and the footer name is TEXTDUMP(4) β bye bestie! π
π¦ where this page comes from
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- nixpkgs unstable: source
- Copyright (c) 2007 Robert N. M. Watson
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms