Section: Maintenance Commands (8)
Return to Main Contents
crash - Analyze Linux crash data or a live system
is a tool for interactively analyzing the state of the Linux system
while it is running, or after a kernel crash has occurred and a
core dump has been created by the Red Hat
facilities. It is loosely based on the SVR4 UNIX crash
command, but has been significantly enhanced
by completely merging it with the
debugger. The marriage of the two effectively combines the
kernel-specific nature of the traditional UNIX crash utility with the
source code level debugging capabilities of
The current set of commands consist of common kernel core analysis tools
such as kernel stack back traces of all processes, source code disassembly,
formatted kernel structure and variable displays, virtual memory data,
dumps of linked-lists, etc., along with several commands that delve
deeper into specific kernel subsystems. Appropriate
commands may also be entered, which in
turn are passed on to the gdb module for execution.
The crash utility is designed to be independent of Linux version
dependencies. When new kernel source code impacts the
correct functionality of crash and its command set, the utility will
be updated to recognize new kernel code changes, while
maintaining backwards compatibility with earlier releases.
- -h opt
displays a help message. If the optional
command name, the help page for that command is displayed. If it is
the string "input", a page describing the various
command line input options is displayed. If it is the string "output", a
page describing command line output options is displayed.
displays the versions of the original gdb and crash libraries
that make up the
does not display any version, GPL, or crash initialization data during startup. It
proceeds directly to the "crash>" prompt.
- -i file
reads and executes the crash command(s) contained in
before accepting any user input.
- -d num
sets its internal debug level.
The higher the number, the more debugging data will be printed while
uses "/boot/System.map" as the
This is a pathname to an uncompressed kernel image
(a vmlinux file) that has been compiled with the "-g" option,
or that has an accessible, associated, debuginfo file.
argument is entered, then this argument must also be used. If the
argument is not entered and no
argument is entered,
will search in several typical directories
for a kernel namelist that matches the live system.
If the live system kernel, or the kernel from which the
was derived, was not compiled with the -g switch, then the additional
argument is required. It may be either the associated System.map file, or
the non-debug kernel namelist. However, if the
argument is used, then the
argument must be a kernel namelist of a similar kernel
version that was built with the -g switch.
This is a pathname to a kernel memory core dump
file. If the
argument is not entered, the session will be invoked on the live system
using /dev/mem, which usually requires root privileges.
Each crash command generally falls into one of the following categories:
- Symbolic display
Displays of kernel text/data, which take full advantage of the power of
to format and display data structures symbolically.
- System state
The majority of crash commands come consist of a set of "kernel-aware"
commands, which delve into various kernel subsystems on a system-wide
or per-task basis.
- Utility functions
A set of useful helper commands serving various purposes, some simple,
others quite powerful.
- Session control
Commands that control the crash session itself.
The following alphabetical list consists of a very simple overview of each crash command.
However, since individual commands often have several options resulting in
significantly different output, it is suggested that the full description
of each command be viewed by entering the command
crash -h command,
or during a crash session by simply entering
"pointer to" is shorthand for either the
commands. It displays the contents of a kernel structure or union.
creates a single-word alias for a command.
displays an ascii chart or translates a numeric value into its ascii components.
displays a task's kernel-stack backtrace. If it is given the
option, it displays the stack traces of the active tasks on all CPUs.
It is often used with the
command to display the backtraces of all tasks with one command.
translates a byte value (physical offset) to it's page number.
displays data concerning the character and block device
assignments, I/O port usage, I/O memory usage, and PCI device data.
disassembles memory, either entire kernel functions, from a
location for a specified number of instructions, or from the start of a
function up to a specified memory location.
evalues an expression or numeric type and displays the result
in hexadecimal, decimal, octal and binary.
dynamically loads or unloads crash extension shared object
displays information about open files in a context.
repeats a specified command for the specified (or all) tasks
in the system.
displays the tasks using the specified file or socket.
passes its argument to the underlying
program. It is useful for executing
commands that have the same name as
alone displays the command menu; if followed by a command name, a full
description of a command, its options, and examples are displayed.
Its output is far more complete and useful than this man page.
displays data concerning interrupt request numbers and
bottom-half interrupt handling.
displays information about the use of kernel memory.
displays the contents of a linked list.
displays the kernel log_buf contents in chronological order.
displays data specific to the machine type.
displays information about the currently installed kernel modules,
or adds or deletes symbolic or debugging information about specified kernel
displays information about the currently-mounted filesystems.
display various network related data.
passes its arguments to the
"print" command for evaluation and display.
displays process status for specified, or all, processes
in the system.
translates the hexadecimal contents of a PTE into its physical
page address and page bit settings.
translates a page frame number to its byte value.
translates a hexadecimal physical address into a kernel
is an alias for the "exit" command.
displays the contents of memory, with the output formatted
in several different manners.
repeats a command indefinitely, optionally delaying a given
number of seconds between each command execution.
displays the tasks on the run queue.
searches a range of user or kernel memory space for given value.
either sets a new context, or gets the current context for
displays signal-handling data of one or more tasks.
displays either a structure definition or the contents of a
kernel structure at a specified address.
displays information about each configured swap device.
translates a symbol to its virtual address, or a static
kernel virtual address to its symbol -- or to a symbol-plus-offset value,
displays system-specific data.
displays the contents of a task_struct.
displays the timer queue entries, both old- and new-style,
in chronological order.
is similar to the
command, except that it works on kernel unions.
displays basic virtual memory information of a context.
translates a user or kernel virtual address to its physical
walks the wait queue list displaying the tasks which
are blocked on the specified wait queue.
displays the definition of structures, unions, typedefs or
modifies the contents of memory. When writing to memory on
a live system, this command should obviously be used with great care.
Initialization commands. The file can be located in the user's
directory and/or the current directory. Commands found in the
file in the
directory are executed before those in the current directory's
Command input is read using
is set to
then suitable keybindings are used. If
is not set, then
is used. This can be overridden by
commands located in a
file, or by entering
is set, its value is used as the name of the program to which command output will be sent.
If not, then command output is sent to
/usr/bin/less -E -X
does not work, look for a newer version: kernel evolution frequently makes
set scroll off
will cause output to be sent directly to
the terminal rather than through a paging program. This is useful,
for example, if you are running
in a window of
Dave Anderson <email@example.com> wrote
- Jay Fenlason <firstname.lastname@example.org> wrote this man page.
provides more complete and accurate documentation than this man page.
- the home page of the
- SEE ALSO
linux.jgfs.net manual pages