Blame crash.8

Packit bf408e
.\"
Packit bf408e
.de CO
Packit bf408e
\dB\\$1\fP \fI\\$2\fP
Packit bf408e
..
Packit bf408e
.TH CRASH 8
Packit bf408e
.SH NAME
Packit bf408e
crash \- Analyze Linux crash dump data or a live system
Packit bf408e
.SH SYNOPSIS
Packit bf408e
.B crash
Packit bf408e
[\fIOPTION\fR]... \fINAMELIST MEMORY-IMAGE[@ADDRESS]    (dumpfile form)\fR
Packit bf408e
.br
Packit bf408e
.B crash
Packit bf408e
[\fIOPTION\fR]... \fI[NAMELIST]                         (live system form)\fR
Packit bf408e
.SH DESCRIPTION
Packit bf408e
.B Crash
Packit bf408e
is a tool for interactively analyzing the state of the Linux system
Packit bf408e
while it is running, or after a kernel crash has occurred and a 
Packit bf408e
core dump has been created by the 
Packit bf408e
.I netdump,
Packit bf408e
.I diskdump,
Packit bf408e
.I LKCD,
Packit bf408e
.I kdump,
Packit bf408e
.I xendump
Packit bf408e
or
Packit bf408e
.I kvmdump
Packit bf408e
facilities.  It is loosely based on the SVR4 UNIX crash 
Packit bf408e
command, but has been significantly enhanced
Packit bf408e
by completely merging it with the 
Packit bf408e
.B gdb(1)
Packit bf408e
debugger. The marriage of the two effectively combines the 
Packit bf408e
kernel-specific nature of the traditional UNIX crash utility with the 
Packit bf408e
source code level debugging capabilities of 
Packit bf408e
.B gdb(1). 
Packit bf408e
Packit bf408e
In the
Packit bf408e
.I dumpfile form,
Packit bf408e
both a NAMELIST and a MEMORY-IMAGE argument must be entered.
Packit bf408e
In the
Packit bf408e
.I live system form,
Packit bf408e
the NAMELIST argument must be entered if 
Packit bf408e
the kernel's
Packit bf408e
.I vmlinux 
Packit bf408e
file is not
Packit bf408e
located in a known location, such as the 
Packit bf408e
.I /usr/lib/debug/lib/modules/<kernel-version>
Packit bf408e
directory.  
Packit bf408e
Packit bf408e
The
Packit bf408e
.B crash
Packit bf408e
utility has also been extended to support the analysis
Packit bf408e
of dumpfiles generated by a crash of the Xen hypervisor.  In that
Packit bf408e
case, the NAMELIST argument must be that of the 
Packit bf408e
.I xen-syms
Packit bf408e
binary.
Packit bf408e
Live system analysis is not supported for the Xen hypervisor.
Packit bf408e
Packit bf408e
The 
Packit bf408e
.B crash
Packit bf408e
utility command set consists of common kernel core analysis tools 
Packit bf408e
such as kernel stack back traces of all processes, source code disassembly,
Packit bf408e
formatted kernel structure and variable displays, virtual memory data, 
Packit bf408e
dumps of linked-lists, etc., along with several commands that delve 
Packit bf408e
deeper into specific kernel subsystems.  Appropriate 
Packit bf408e
.B gdb
Packit bf408e
commands may also be entered, which in
Packit bf408e
turn are passed on to the 
Packit bf408e
.B gdb 
Packit bf408e
module for execution. 
Packit bf408e
If desired, commands may be placed in either a
Packit bf408e
.I $HOME/.crashrc
Packit bf408e
file and/or in a 
Packit bf408e
.I .crashrc 
Packit bf408e
file in the current directory.
Packit bf408e
During initialization, the commands in 
Packit bf408e
.I $HOME/.crashrc
Packit bf408e
are executed first, followed by those in the 
Packit bf408e
.I ./.crashrc
Packit bf408e
file.
Packit bf408e
Packit bf408e
The 
Packit bf408e
.B crash 
Packit bf408e
utility is designed to be independent of Linux version 
Packit bf408e
dependencies. When new kernel source code impacts the
Packit bf408e
correct functionality of 
Packit bf408e
.B crash
Packit bf408e
and its command set, the utility will 
Packit bf408e
be updated to recognize new kernel code changes, while
Packit bf408e
maintaining backwards compatibility with earlier releases.
Packit bf408e
.SH OPTIONS
Packit bf408e
.de BS
Packit bf408e
\fB\\$1\fP\ \fR\\$2\fP
Packit bf408e
..
Packit bf408e
.TP
Packit bf408e
.BI NAMELIST
Packit bf408e
This is a pathname to an uncompressed kernel image
Packit bf408e
(a 
Packit bf408e
.I vmlinux 
Packit bf408e
file), or a Xen hypervisor image (a 
Packit bf408e
.I xen-syms
Packit bf408e
file) 
Packit bf408e
which has been compiled with the "-g" option.
Packit bf408e
If using the
Packit bf408e
.I dumpfile form,
Packit bf408e
a 
Packit bf408e
.I vmlinux 
Packit bf408e
file may be compressed in either gzip or bzip2 formats.
Packit bf408e
.TP
Packit bf408e
.BI MEMORY-IMAGE[@ADDRESS]
Packit bf408e
A kernel core dump file created by the
Packit bf408e
.I netdump,
Packit bf408e
.I diskdump,
Packit bf408e
.I LKCD
Packit bf408e
.I kdump,
Packit bf408e
.I xendump
Packit bf408e
or
Packit bf408e
.I kvmdump
Packit bf408e
facilities.  
Packit bf408e
Packit bf408e
If a MEMORY-IMAGE argument is not entered, the session will be invoked on
Packit bf408e
the live system, which typically requires root privileges because of
Packit bf408e
the device file used to access system RAM.  By default,
Packit bf408e
.I /dev/crash
Packit bf408e
will be used if it exists.  If it does not exist, then
Packit bf408e
.I /dev/mem 
Packit bf408e
will be used; but if the kernel has been configured 
Packit bf408e
with 
Packit bf408e
.B CONFIG_STRICT_DEVMEM, 
Packit bf408e
then
Packit bf408e
.I /proc/kcore 
Packit bf408e
will be used.
Packit bf408e
It is permissible to explicitly enter 
Packit bf408e
.I /dev/crash, 
Packit bf408e
.I /dev/mem
Packit bf408e
or 
Packit bf408e
.I /proc/kcore.
Packit bf408e
Packit bf408e
An @ADDRESS value must be appended to the MEMORY-IMAGE if the dumpfile
Packit bf408e
is a raw RAM dumpfile that has no header information describing the file
Packit bf408e
contents.  Multiple MEMORY-IMAGE@ADDRESS ordered pairs may be entered,
Packit bf408e
with each dumpfile containing a contiguous block of RAM, where the ADDRESS
Packit bf408e
value is the physical start address of the block expressed in hexadecimal.
Packit bf408e
The physical address value(s) will be used to create a temporary ELF header
Packit bf408e
in /var/tmp, which will only exist during the crash session.  If a raw RAM
Packit bf408e
dumpile represents a live memory source, such as that specified by the QEMU
Packit bf408e
mem-path argument of a memory-backend-file object, then "live:" must be
Packit bf408e
prepended to the MEMORY-IMAGE name.
Packit bf408e
.TP
Packit bf408e
.BI mapfile
Packit bf408e
If the NAMELIST file is not the same kernel that is
Packit bf408e
running (live system form), or the kernel that was running 
Packit bf408e
when the system crashed (dumpfile form), then the
Packit bf408e
.I System.map
Packit bf408e
file of the original kernel should be entered on the command line.
Packit bf408e
.P
Packit bf408e
.BI -h \ [option]
Packit bf408e
.br
Packit bf408e
.BI \--help \ [option]
Packit bf408e
.RS
Packit bf408e
Without an 
Packit bf408e
.I option
Packit bf408e
argument, display a 
Packit bf408e
.B crash
Packit bf408e
usage help message.  If the 
Packit bf408e
.I option
Packit bf408e
argument is a
Packit bf408e
.B crash
Packit bf408e
command name, the help page for that command is displayed.  If it is
Packit bf408e
the string "input", a page describing the various
Packit bf408e
.B crash
Packit bf408e
command line input options is displayed.  If it is the string "output", a
Packit bf408e
page describing command line output options is displayed.  
Packit bf408e
If it is the string "all", then all of the possible help messages
Packit bf408e
are displayed.  After the help message is displayed, 
Packit bf408e
.B crash
Packit bf408e
exits.
Packit bf408e
.RE
Packit bf408e
.TP
Packit bf408e
.B \-s
Packit bf408e
Silently proceed directly to the "crash>" prompt without displaying
Packit bf408e
any version, GPL, or 
Packit bf408e
.B crash
Packit bf408e
initialization data during startup, and by default, runtime command
Packit bf408e
output is not passed to any scrolling command.
Packit bf408e
.TP
Packit bf408e
.BI \-i \ file
Packit bf408e
Execute the command(s) contained in
Packit bf408e
.I file
Packit bf408e
prior to displaying the "crash>" prompt for interactive
Packit bf408e
user input.
Packit bf408e
.TP
Packit bf408e
.BI \-d \ num
Packit bf408e
Set the internal debug level.
Packit bf408e
The higher the number, the more debugging data will be printed when
Packit bf408e
.B crash
Packit bf408e
initializes and runs.
Packit bf408e
.TP
Packit bf408e
.B \-S
Packit bf408e
Use 
Packit bf408e
.I /boot/System.map
Packit bf408e
as the
Packit bf408e
.I mapfile\fP.
Packit bf408e
.TP
Packit bf408e
.B \-e \fIvi | emacs\fR
Packit bf408e
Set the 
Packit bf408e
.B readline(3) 
Packit bf408e
command line editing mode to "vi" or "emacs".  The default
Packit bf408e
editing mode is "vi".
Packit bf408e
.TP
Packit bf408e
.B \-f
Packit bf408e
Force the usage of a compressed 
Packit bf408e
.I vmlinux 
Packit bf408e
file if its original name
Packit bf408e
does not start with "vmlinux".
Packit bf408e
.TP
Packit bf408e
.B \-k
Packit bf408e
Indicate that the NAMELIST file is an LKCD "Kerntypes" debuginfo file.
Packit bf408e
.TP
Packit bf408e
.BI -g \ [namelist]
Packit bf408e
Determine if a  
Packit bf408e
.I vmlinux 
Packit bf408e
or 
Packit bf408e
.I xen-syms 
Packit bf408e
namelist file contains debugging data.
Packit bf408e
.TP
Packit bf408e
.B \-t
Packit bf408e
Display the system-crash timestamp and exit. 
Packit bf408e
.TP
Packit bf408e
.B \-L
Packit bf408e
Attempt to lock all of its virtual address space into memory by calling mlockall(MCL_CURRENT|MCL_FUTURE) 
Packit bf408e
during initialization.  If the system call fails, an error message will be displayed,
Packit bf408e
but the session continues.
Packit bf408e
.TP
Packit bf408e
.BI \-c \ tty-device
Packit bf408e
Open the 
Packit bf408e
.I tty-device 
Packit bf408e
as the console used for debug messages.
Packit bf408e
.TP
Packit bf408e
.BI \-p \ page-size
Packit bf408e
If a processor's page size cannot be determined by the dumpfile,
Packit bf408e
and the processor default cannot be used, use 
Packit bf408e
.I page-size.
Packit bf408e
.TP
Packit bf408e
.BI \-o \ filename
Packit bf408e
Only used with the MEMORY-IMAGE@ADDRESS format for raw RAM dumpfiles, 
Packit bf408e
specifies a filename of a new ELF vmcore that will be created and used
Packit bf408e
as the dumpfile.  It will be saved to allow future use as a standalone
Packit bf408e
vmcore, replacing the original raw RAM dumpfile.
Packit bf408e
.P
Packit bf408e
.B -m \fIoption=value\fR
Packit bf408e
.br
Packit bf408e
.B --machdep \fIoption=value\fR
Packit bf408e
.RS
Packit bf408e
Pass an option and value pair to machine-dependent code.  These
Packit bf408e
architecture-specific option/pairs should only be
Packit bf408e
required in very rare circumstances:
Packit bf408e
.P
Packit bf408e
.nf
Packit bf408e
X86_64:
Packit bf408e
  phys_base=<physical-address>
Packit bf408e
  irq_eframe_link=<value>
Packit bf408e
  irq_stack_gap=<value>
Packit bf408e
  max_physmem_bits=<value>
Packit bf408e
  kernel_image_size=<value>
Packit bf408e
  vm=orig       (pre-2.6.11 virtual memory address ranges)
Packit bf408e
  vm=2.6.11     (2.6.11 and later virtual memory address ranges)
Packit bf408e
  vm=xen        (Xen kernel virtual memory address ranges)
Packit bf408e
  vm=xen-rhel4  (RHEL4 Xen kernel virtual address ranges)
Packit bf408e
  vm=5level     (5-level page tables)
Packit bf408e
  page_offset=<PAGE_OFFSET-value>
Packit bf408e
PPC64:
Packit bf408e
  vm=orig
Packit bf408e
  vm=2.6.14     (4-level page tables)
Packit bf408e
IA64:
Packit bf408e
  phys_start=<physical-address>
Packit bf408e
  init_stack_size=<size>
Packit bf408e
  vm=4l         (4-level page tables)
Packit bf408e
ARM:  
Packit bf408e
  phys_base=<physical-address>
Packit bf408e
ARM64:  
Packit bf408e
  phys_offset=<physical-address>
Packit bf408e
  kimage_voffset=<kimage_voffset-value>
Packit bf408e
  max_physmem_bits=<value>
Packit bf408e
X86:
Packit bf408e
  page_offset=<CONFIG_PAGE_OFFSET-value>
Packit bf408e
.fi
Packit bf408e
.RE
Packit bf408e
.TP
Packit bf408e
.B \-x
Packit bf408e
Automatically load extension modules from a particular directory. 
Packit bf408e
If a directory is specified in the 
Packit bf408e
.B CRASH_EXTENSIONS
Packit bf408e
shell environment
Packit bf408e
variable, then that directory will be used.  Otherwise 
Packit bf408e
.I /usr/lib64/crash/extensions
Packit bf408e
(64-bit architectures) or 
Packit bf408e
.I /usr/lib/crash/extensions
Packit bf408e
(32-bit architectures) will be used;
Packit bf408e
if they do not exist, then the 
Packit bf408e
.I ./extensions directory will be used.
Packit bf408e
.TP
Packit bf408e
.BI --active
Packit bf408e
Track only the active task on each cpu.
Packit bf408e
.TP
Packit bf408e
.BI --buildinfo
Packit bf408e
Display the crash binary's build date, the user ID of the builder,
Packit bf408e
the hostname of the machine where the build was done, the target 
Packit bf408e
architecture, the version number, and the compiler version.
Packit bf408e
.TP
Packit bf408e
.BI --memory_module \ modname
Packit bf408e
Use the
Packit bf408e
.I modname
Packit bf408e
as an alternative kernel module to the 
Packit bf408e
.I crash.ko
Packit bf408e
module that creates the
Packit bf408e
.I /dev/crash
Packit bf408e
device.
Packit bf408e
.TP
Packit bf408e
.BI --memory_device \ device
Packit bf408e
Use
Packit bf408e
.I device
Packit bf408e
as an alternative device to the 
Packit bf408e
.I /dev/crash, /dev/mem
Packit bf408e
or
Packit bf408e
.I /proc/kcore
Packit bf408e
devices.
Packit bf408e
.TP
Packit bf408e
.BI --log \ dumpfile
Packit bf408e
Dump the contents of the kernel log buffer.  A kernel namelist
Packit bf408e
argument is not necessary, but the dumpfile must contain the
Packit bf408e
VMCOREINFO data taken from the original /proc/vmcore ELF header.
Packit bf408e
.TP
Packit bf408e
.B --no_kallsyms
Packit bf408e
Do not use kallsyms-generated symbol information contained within 
Packit bf408e
kernel module object files.
Packit bf408e
.TP
Packit bf408e
.B --no_modules
Packit bf408e
Do not access or display any kernel module related information. 
Packit bf408e
.TP
Packit bf408e
.B --no_ikconf
Packit bf408e
Do not attempt to read configuration data that was built into kernels
Packit bf408e
configured with 
Packit bf408e
.B CONFIG_IKCONFIG.
Packit bf408e
.TP
Packit bf408e
.B --no_data_debug
Packit bf408e
Do not verify the validity of all structure member offsets and structure 
Packit bf408e
sizes that it uses.
Packit bf408e
.TP
Packit bf408e
.B --no_kmem_cache
Packit bf408e
Do not initialize the kernel's slab cache infrastructure, and commands that
Packit bf408e
use kmem_cache-related data will not work.
Packit bf408e
.TP
Packit bf408e
.B --no_elf_notes
Packit bf408e
Do not use the registers from the ELF NT_PRSTATUS notes saved in a compressed kdump header
Packit bf408e
for backtraces.
Packit bf408e
.TP
Packit bf408e
.B --kmem_cache_delay
Packit bf408e
Delay the initialization of the kernel's slab cache infrastructure until
Packit bf408e
it is required by a run-time command.
Packit bf408e
.TP
Packit bf408e
.B --readnow
Packit bf408e
Pass this flag to the embedded 
Packit bf408e
.B gdb
Packit bf408e
module, which will override its two-stage strategy that it uses for reading
Packit bf408e
symbol tables from the NAMELIST.
Packit bf408e
.TP
Packit bf408e
.B --smp
Packit bf408e
Specify that the system being analyzed is an SMP kernel.
Packit bf408e
.P
Packit bf408e
.B -v
Packit bf408e
.br
Packit bf408e
.B --version
Packit bf408e
.RS
Packit bf408e
Display the version of the
Packit bf408e
.B crash
Packit bf408e
utility, the version of the embedded
Packit bf408e
.B gdb
Packit bf408e
module, GPL information, and copyright notices.
Packit bf408e
.RE
Packit bf408e
.TP
Packit bf408e
.BI --cpus \ number
Packit bf408e
Specify the 
Packit bf408e
.I number 
Packit bf408e
of cpus in the SMP system being analyzed.
Packit bf408e
.TP
Packit bf408e
.BI --osrelease \ dumpfile
Packit bf408e
Display the OSRELEASE vmcoreinfo string from a kdump 
Packit bf408e
.I dumpfile 
Packit bf408e
header.
Packit bf408e
.TP
Packit bf408e
.BI --hyper
Packit bf408e
Force the session to be that of a Xen hypervisor.
Packit bf408e
.TP
Packit bf408e
.BI --p2m_mfn \ pfn
Packit bf408e
When a Xen Hypervisor or its dom0 kernel crashes, the dumpfile
Packit bf408e
is typically analyzed with either the Xen hypervisor or the dom0 kernel.
Packit bf408e
It is also possible to analyze any of the guest domU kernels if 
Packit bf408e
the pfn_to_mfn_list_list 
Packit bf408e
.I pfn 
Packit bf408e
value of the guest kernel is passed on the
Packit bf408e
command line along with its NAMELIST and the  
Packit bf408e
dumpfile.
Packit bf408e
.TP
Packit bf408e
.BI --xen_phys_start \ physical-address
Packit bf408e
Supply the base physical address of the Xen hypervisor's text and static data
Packit bf408e
for older xendump dumpfiles that did not pass that information in the dumpfile
Packit bf408e
header.
Packit bf408e
.TP
Packit bf408e
.B --zero_excluded
Packit bf408e
If the makedumpfile(8) facility has filtered a compressed kdump dumpfile to
Packit bf408e
exclude various types of non-essential pages, or has marked a compressed or
Packit bf408e
ELF kdump dumpfile as incomplete due to an ENOSPC or other error during its
Packit bf408e
creation, any attempt to read missing pages will fail.  With this flag, reads
Packit bf408e
from any of those pages will return zero-filled memory.
Packit bf408e
.TP
Packit bf408e
.B --no_panic
Packit bf408e
Do not attempt to find the task that was running when the kernel crashed.
Packit bf408e
Set the initial context to that of the "swapper" task on cpu 0.
Packit bf408e
.TP
Packit bf408e
.B --more
Packit bf408e
Use 
Packit bf408e
.I /bin/more 
Packit bf408e
as the command output scroller, overriding the default of 
Packit bf408e
.I /usr/bin/less
Packit bf408e
and any settings in either 
Packit bf408e
.I ./.crashrc 
Packit bf408e
or
Packit bf408e
.I $HOME/.crashrc. 
Packit bf408e
.TP
Packit bf408e
.B --less
Packit bf408e
Use 
Packit bf408e
.I /usr/bin/less 
Packit bf408e
as the command output scroller, overriding 
Packit bf408e
any settings in either 
Packit bf408e
.I ./.crashrc 
Packit bf408e
or 
Packit bf408e
.I $HOME/.crashrc. 
Packit bf408e
.TP
Packit bf408e
.B --hex
Packit bf408e
Set the default command output radix to 16, overriding the default radix of 10,
Packit bf408e
and any radix settings in either
Packit bf408e
.I ./.crashrc
Packit bf408e
or
Packit bf408e
.I $HOME/.crashrc.
Packit bf408e
.TP
Packit bf408e
.B --dec
Packit bf408e
Set the default command output radix to 10, overriding any 
Packit bf408e
radix settings in either
Packit bf408e
.I ./.crashrc
Packit bf408e
or 
Packit bf408e
.I $HOME/.crashrc.  This is the default radix setting.
Packit bf408e
.TP
Packit bf408e
.B --CRASHPAGER
Packit bf408e
Use the output paging command defined in the 
Packit bf408e
.B CRASHPAGER
Packit bf408e
shell environment
Packit bf408e
variable, overriding any settings in either 
Packit bf408e
.I ./.crashrc 
Packit bf408e
or 
Packit bf408e
.I $HOME/.crashrc.
Packit bf408e
.TP
Packit bf408e
.B --no_scroll
Packit bf408e
Do not pass run-time command output to any scrolling command. 
Packit bf408e
.TP
Packit bf408e
.B --no_strip
Packit bf408e
Do not strip cloned kernel text symbol names.
Packit bf408e
.TP
Packit bf408e
.B --no_crashrc
Packit bf408e
Do not execute the commands in either
Packit bf408e
.I $HOME/.crashrc
Packit bf408e
or 
Packit bf408e
.I ./.crashrc.
Packit bf408e
.TP
Packit bf408e
.BI --mod \ directory
Packit bf408e
When loading the debuginfo data of kernel modules with the 
Packit bf408e
.I mod -S
Packit bf408e
command, search for their object files in
Packit bf408e
.I directory
Packit bf408e
instead of in the standard location.
Packit bf408e
.TP
Packit bf408e
.BI --kaslr \ offset | auto
Packit bf408e
If an x86_64 kernel was configured with 
Packit bf408e
.B CONFIG_RANDOMIZE_BASE,
Packit bf408e
the offset value is equal to the difference between the symbol values 
Packit bf408e
compiled into the vmlinux file and their relocated KASLR values.  If set to
Packit bf408e
auto, the KASLR offset value will be automatically calculated.
Packit bf408e
.TP
Packit bf408e
.BI --reloc \ size
Packit bf408e
When analyzing live x86 kernels that were configured with a
Packit bf408e
.B CONFIG_PHYSICAL_START
Packit bf408e
value that is larger than its
Packit bf408e
.B CONFIG_PHYSICAL_ALIGN
Packit bf408e
value, then it will be necessary to enter
Packit bf408e
a relocation size equal to the difference between the two values.
Packit bf408e
.TP
Packit bf408e
.BI --hash \ count
Packit bf408e
Set the number of internal hash queue heads used for list gathering
Packit bf408e
and verification.  The default count is 32768.
Packit bf408e
.TP
Packit bf408e
.B --minimal
Packit bf408e
Bring up a session that is restricted to the 
Packit bf408e
.I log, dis, rd, sym, eval, set
Packit bf408e
and 
Packit bf408e
.I exit
Packit bf408e
commands.  This option may provide a way to
Packit bf408e
extract some minimal/quick information from a corrupted or truncated
Packit bf408e
dumpfile, or in situations where one of the several kernel subsystem
Packit bf408e
initialization routines would abort the 
Packit bf408e
.B crash
Packit bf408e
session.
Packit bf408e
.TP
Packit bf408e
.BI --kvmhost \ [32|64]
Packit bf408e
When examining an x86 KVM guest dumpfile, this option specifies
Packit bf408e
that the KVM host that created the dumpfile was an x86 (32-bit) 
Packit bf408e
or an x86_64 (64-bit) machine, overriding the automatically 
Packit bf408e
determined value.
Packit bf408e
.TP
Packit bf408e
.BI --kvmio \ <size>
Packit bf408e
override the automatically-calculated KVM guest I/O hole size.
Packit bf408e
.TP
Packit bf408e
.BI --offline \ [show|hide]
Packit bf408e
Show or hide command output that is related to offline cpus.  The
Packit bf408e
default setting is show.
Packit bf408e
.SH COMMANDS
Packit bf408e
Each 
Packit bf408e
.B crash
Packit bf408e
command generally falls into one of the following categories:
Packit bf408e
.TP
Packit bf408e
.I Symbolic display
Packit bf408e
Displays of kernel text/data, which take full advantage of the power of 
Packit bf408e
.B gdb
Packit bf408e
to format and display data structures symbolically.
Packit bf408e
.TP
Packit bf408e
.I System state
Packit bf408e
The majority of 
Packit bf408e
.B crash
Packit bf408e
commands consist of a set of "kernel-aware" 
Packit bf408e
commands, which delve into various kernel subsystems on a system-wide 
Packit bf408e
or per-task basis. 
Packit bf408e
.TP
Packit bf408e
.I Utility functions
Packit bf408e
A set of useful helper commands serving various purposes, some simple, 
Packit bf408e
others quite powerful. 
Packit bf408e
.TP
Packit bf408e
.I Session control
Packit bf408e
Commands that control the 
Packit bf408e
.B crash
Packit bf408e
session itself.
Packit bf408e
.PP
Packit bf408e
The following alphabetical list consists of a very simple overview of each 
Packit bf408e
.B crash
Packit bf408e
command.
Packit bf408e
However, since individual commands often have several options resulting in 
Packit bf408e
significantly different output, it is suggested that the full description
Packit bf408e
of each command be viewed by executing
Packit bf408e
.I crash\ -h\ \fI<command>\fP, 
Packit bf408e
or during a 
Packit bf408e
.B crash
Packit bf408e
session by simply entering
Packit bf408e
.B \fIhelp command\fP. 
Packit bf408e
.TP
Packit bf408e
.I *
Packit bf408e
"pointer to" is shorthand for either the
Packit bf408e
.I struct
Packit bf408e
or
Packit bf408e
.I union
Packit bf408e
commands.  It displays the contents of a kernel structure or union.
Packit bf408e
.TP
Packit bf408e
.I alias
Packit bf408e
creates a single-word alias for a command.
Packit bf408e
.TP
Packit bf408e
.I ascii
Packit bf408e
displays an ascii chart or translates a numeric value into its ascii components.
Packit bf408e
.TP
Packit bf408e
.I bt
Packit bf408e
displays a task's kernel-stack backtrace.  If it is given the
Packit bf408e
.I \-a
Packit bf408e
option, it displays the stack traces of the active tasks on all CPUs.
Packit bf408e
It is often used with the
Packit bf408e
.I foreach
Packit bf408e
command to display the backtraces of all tasks with one command.
Packit bf408e
.TP
Packit bf408e
.I btop
Packit bf408e
translates a byte value (physical offset) to its page number.
Packit bf408e
.TP
Packit bf408e
.I dev
Packit bf408e
displays data concerning the character and block device
Packit bf408e
assignments, I/O port usage, I/O memory usage, and PCI device data. 
Packit bf408e
.TP
Packit bf408e
.I dis
Packit bf408e
disassembles memory, either entire kernel functions, from a
Packit bf408e
location for a specified number of instructions, or from the start of a
Packit bf408e
function up to a specified memory location.
Packit bf408e
.TP
Packit bf408e
.I eval
Packit bf408e
evaluates an expression or numeric type and displays the result
Packit bf408e
in hexadecimal, decimal, octal and binary.
Packit bf408e
.TP
Packit bf408e
.I exit
Packit bf408e
causes
Packit bf408e
.B crash
Packit bf408e
to exit.
Packit bf408e
.TP
Packit bf408e
.I extend
Packit bf408e
dynamically loads or unloads 
Packit bf408e
.B crash
Packit bf408e
shared object extension modules.
Packit bf408e
.TP
Packit bf408e
.I files
Packit bf408e
displays information about open files in a context.
Packit bf408e
.TP
Packit bf408e
.I foreach
Packit bf408e
repeats a specified command for the specified (or all) tasks
Packit bf408e
in the system.
Packit bf408e
.TP
Packit bf408e
.I fuser
Packit bf408e
displays the tasks using the specified file or socket.
Packit bf408e
.TP
Packit bf408e
.I gdb
Packit bf408e
passes its argument to the embedded
Packit bf408e
.B gdb
Packit bf408e
module.  It is useful for executing
Packit bf408e
.B gdb 
Packit bf408e
commands that have the same name as
Packit bf408e
.B crash
Packit bf408e
commands.
Packit bf408e
.TP
Packit bf408e
.I help
Packit bf408e
alone displays the command menu; if followed by a command name, a full
Packit bf408e
description of a command, its options, and examples are displayed.
Packit bf408e
Its output is far more complete and useful than this man page.
Packit bf408e
.TP
Packit bf408e
.I ipcs
Packit bf408e
displays data about the System V IPC facilities.
Packit bf408e
.TP
Packit bf408e
.I irq
Packit bf408e
displays data concerning interrupt request numbers and
Packit bf408e
bottom-half interrupt handling. 
Packit bf408e
.TP
Packit bf408e
.I kmem
Packit bf408e
displays information about the use of kernel memory.
Packit bf408e
.TP
Packit bf408e
.I list
Packit bf408e
displays the contents of a linked list.
Packit bf408e
.TP
Packit bf408e
.I log
Packit bf408e
displays the kernel log_buf contents in chronological order.
Packit bf408e
.TP
Packit bf408e
.I mach
Packit bf408e
displays data specific to the machine type.
Packit bf408e
.TP
Packit bf408e
.I mod
Packit bf408e
displays information about the currently installed kernel modules,
Packit bf408e
or adds or deletes symbolic or debugging information about specified kernel
Packit bf408e
modules.
Packit bf408e
.TP
Packit bf408e
.I mount
Packit bf408e
displays information about the currently-mounted filesystems.
Packit bf408e
.TP
Packit bf408e
.I net
Packit bf408e
display various network related data.
Packit bf408e
.TP
Packit bf408e
.I p
Packit bf408e
passes its arguments to the
Packit bf408e
.B gdb
Packit bf408e
"print" command for evaluation and display.
Packit bf408e
.TP
Packit bf408e
.I ps
Packit bf408e
displays process status for specified, or all, processes
Packit bf408e
in the system.
Packit bf408e
.TP
Packit bf408e
.I pte
Packit bf408e
translates the hexadecimal contents of a PTE into its physical
Packit bf408e
page address and page bit settings.
Packit bf408e
.TP
Packit bf408e
.I ptob
Packit bf408e
translates a page frame number to its byte value.
Packit bf408e
.TP
Packit bf408e
.I ptov
Packit bf408e
translates a hexadecimal physical address into a kernel 
Packit bf408e
virtual address.
Packit bf408e
.TP
Packit bf408e
.I q
Packit bf408e
is an alias for the "exit" command.
Packit bf408e
.TP
Packit bf408e
.I rd
Packit bf408e
displays the contents of memory, with the output formatted
Packit bf408e
in several different manners.
Packit bf408e
.TP
Packit bf408e
.I repeat
Packit bf408e
repeats a command indefinitely, optionally delaying a given
Packit bf408e
number of seconds between each command execution.
Packit bf408e
.TP
Packit bf408e
.I runq
Packit bf408e
displays the tasks on the run queue.
Packit bf408e
.TP
Packit bf408e
.I search
Packit bf408e
searches a range of user or kernel memory space for given value.
Packit bf408e
.TP
Packit bf408e
.I set
Packit bf408e
either sets a new context, or gets the current context for
Packit bf408e
display.
Packit bf408e
.TP
Packit bf408e
.I sig
Packit bf408e
displays signal-handling data of one or more tasks.
Packit bf408e
.TP
Packit bf408e
.I struct
Packit bf408e
displays either a structure definition or the contents of a
Packit bf408e
kernel structure at a specified address.
Packit bf408e
.TP
Packit bf408e
.I swap
Packit bf408e
displays information about each configured swap device.
Packit bf408e
.TP
Packit bf408e
.I sym
Packit bf408e
translates a symbol to its virtual address, or a static 
Packit bf408e
kernel virtual address to its symbol -- or to a symbol-plus-offset value,
Packit bf408e
if appropriate.
Packit bf408e
.TP
Packit bf408e
.I sys
Packit bf408e
displays system-specific data.
Packit bf408e
.TP
Packit bf408e
.I task
Packit bf408e
displays the contents of a task_struct.
Packit bf408e
.TP
Packit bf408e
.I tree
Packit bf408e
displays the contents of a red-black tree or a radix tree.
Packit bf408e
.TP
Packit bf408e
.I timer
Packit bf408e
displays the timer queue entries, both old- and new-style,
Packit bf408e
in chronological order.
Packit bf408e
.TP
Packit bf408e
.I union
Packit bf408e
is similar to the
Packit bf408e
.I struct
Packit bf408e
command, except that it works on kernel unions.
Packit bf408e
.TP
Packit bf408e
.I vm
Packit bf408e
displays basic virtual memory information of a context.
Packit bf408e
.TP
Packit bf408e
.I vtop
Packit bf408e
translates a user or kernel virtual address to its physical
Packit bf408e
address.
Packit bf408e
.TP
Packit bf408e
.I waitq
Packit bf408e
walks the wait queue list displaying the tasks which 
Packit bf408e
are blocked on the specified wait queue.
Packit bf408e
.TP
Packit bf408e
.I whatis
Packit bf408e
displays the definition of structures, unions, typedefs or
Packit bf408e
text/data symbols.
Packit bf408e
.TP
Packit bf408e
.I wr
Packit bf408e
modifies the contents of memory on a live system. 
Packit bf408e
It can only be used if
Packit bf408e
.I /dev/mem
Packit bf408e
is the device file being used to access system RAM, and should obviously be used with great care.
Packit bf408e
.PP
Packit bf408e
When 
Packit bf408e
.B crash
Packit bf408e
is invoked with a Xen hypervisor binary as the NAMELIST, the
Packit bf408e
command set is slightly modified.  The
Packit bf408e
.I *, alias, ascii, bt, dis, eval, exit, extend,
Packit bf408e
.I gdb, help, list, log, p, pte, rd, repeat,
Packit bf408e
.I search, set, struct, sym, sys, union,
Packit bf408e
.I whatis, wr
Packit bf408e
and 
Packit bf408e
.I q
Packit bf408e
commands are the same as above.  The following commands
Packit bf408e
are specific to the Xen hypervisor:
Packit bf408e
.TP
Packit bf408e
.I domain
Packit bf408e
displays the contents of the domain structure for selected, or all, domains.
Packit bf408e
.TP
Packit bf408e
.I doms
Packit bf408e
displays domain status for selected, or all, domains.
Packit bf408e
.TP
Packit bf408e
.I dumpinfo
Packit bf408e
displays Xen dump information for selected, or all, cpus.
Packit bf408e
.TP
Packit bf408e
.I pcpus
Packit bf408e
displays physical cpu information for selected, or all, cpus.
Packit bf408e
.TP
Packit bf408e
.I vcpus
Packit bf408e
displays vcpu status for selected, or all, vcpus.
Packit bf408e
.SH FILES
Packit bf408e
.TP
Packit bf408e
.I .crashrc
Packit bf408e
Initialization commands.  The file can be located in the user's
Packit bf408e
.B HOME 
Packit bf408e
directory and/or the current directory.  Commands found in the
Packit bf408e
.I .crashrc
Packit bf408e
file in the 
Packit bf408e
.B HOME
Packit bf408e
directory are executed before those in the current directory's 
Packit bf408e
.I .crashrc
Packit bf408e
file.
Packit bf408e
.SH ENVIRONMENT
Packit bf408e
.TP
Packit bf408e
.B EDITOR
Packit bf408e
Command input is read using
Packit bf408e
.BR readline(3).
Packit bf408e
If
Packit bf408e
.B EDITOR
Packit bf408e
is set to
Packit bf408e
.I emacs
Packit bf408e
or
Packit bf408e
.I vi
Packit bf408e
then suitable keybindings are used.  If 
Packit bf408e
.B EDITOR
Packit bf408e
is not set, then
Packit bf408e
.I vi
Packit bf408e
is used.  This can be overridden by
Packit bf408e
.B set vi
Packit bf408e
or 
Packit bf408e
.B set emacs
Packit bf408e
commands located in a
Packit bf408e
.IR .crashrc 
Packit bf408e
file, or by entering
Packit bf408e
.B -e emacs
Packit bf408e
on the
Packit bf408e
.B crash
Packit bf408e
command line.
Packit bf408e
.TP
Packit bf408e
.B CRASHPAGER
Packit bf408e
If
Packit bf408e
.B CRASHPAGER
Packit bf408e
is set, its value is used as the name of the program to which command output will be sent. 
Packit bf408e
If not, then command output is sent to 
Packit bf408e
.B /usr/bin/less -E -X 
Packit bf408e
by default.
Packit bf408e
.TP
Packit bf408e
.B CRASH_MODULE_PATH
Packit bf408e
Specifies an alternative directory tree to search for kernel module
Packit bf408e
object files.
Packit bf408e
.TP
Packit bf408e
.B CRASH_EXTENSIONS
Packit bf408e
Specifies a directory containing extension modules that will be loaded
Packit bf408e
automatically if the 
Packit bf408e
.B -x
Packit bf408e
command line option is used.
Packit bf408e
.SH NOTES
Packit bf408e
.PP
Packit bf408e
If
Packit bf408e
.B crash
Packit bf408e
does not work, look for a newer version: kernel evolution frequently makes
Packit bf408e
.B crash
Packit bf408e
updates necessary.
Packit bf408e
.PP
Packit bf408e
The command
Packit bf408e
.B set scroll off
Packit bf408e
will cause output to be sent directly to
Packit bf408e
the terminal rather than through a paging program.  This is useful,
Packit bf408e
for example, if you are running
Packit bf408e
.B crash
Packit bf408e
in a window of
Packit bf408e
.BR emacs .
Packit bf408e
.SH AUTHOR
Packit bf408e
Dave Anderson <anderson@redhat.com> wrote
Packit bf408e
.B crash.
Packit bf408e
.TP
Packit bf408e
Jay Fenlason <fenlason@redhat.com> and Dave Anderson <anderson@redhat.com> wrote this man page.
Packit bf408e
.SH "SEE ALSO"
Packit bf408e
.PP
Packit bf408e
The
Packit bf408e
.I help
Packit bf408e
command within
Packit bf408e
.B crash
Packit bf408e
provides more complete and accurate documentation than this man page.
Packit bf408e
.PP
Packit Service b3827b
.I http://people.redhat.com/anderson
Packit bf408e
- the home page of the
Packit bf408e
.B crash
Packit bf408e
utility.
Packit bf408e
.PP
Packit bf408e
.BR netdump (8),
Packit bf408e
.BR gdb (1),
Packit bf408e
.BR makedumpfile(8)