SysIII/usr/src/man/man1/crash.1m

.TH CRASH 1M
.SH NAME
crash \- examine system images
.SH SYNOPSIS
.B /etc/crash
[ system ] [ namelist ] [ ka6 ]
.SH DESCRIPTION
.I Crash\^
is an interactive utility for examining
an operating system core image.
It has facilities for interpreting
and formating the various control structures
in the system and certain miscellaneous
functions that are useful when perusing a dump.
.PP
The arguments to
.I crash\^
are the file name where the system image
can be found,
a namelist file to be used
for symbol values,
and the segment address
of the initial process to be examined.
The current process can be changed via subsequent commands.
The default values are
.BR /dev/mem ,
.BR /unix ,
and the location of the swapper, process 0;
hence,
.I crash\^
with no arguments can be used to examine
an active system.
If a system image file is given,
it is assumed to be a system core dump and
the initial process is set to be that of the
process running at the time
of the crash.
This is determined by the value of
.B ka6
stored in a fixed location
by the system dump mechanism.
.SH COMMANDS
Input to
.I crash\^
is typically of the form:
.br
.ti 10
command [ options ] [ structures to be printed ].
.br
When allowed,
options will modify the format of the print out.
If no specific structure elements are specified,
all valid entries will be used.
As an example,
.B "proc \- 12 15 3"
would print process table slots
12, 15 and 3 in a long format,
while
.B proc
would print the entire process table
in the standard format.
The current repertory consists of:
.TP
\fBka6\fP [ segment address ]
Print the location of the current process
if no argument is given, or set
the location to that of the supplied value.
.TP
.B u
Print the user structure of the current process
as determined by the value of
.IR ka6 .
.TP
.BR trace [ \-r ]
Generate a kernel stack trace of the current process.
If the
.B \-r
option is used,
the trace begins at the saved stack frame pointer in
r5.
Otherwise the trace starts at the bottom of the stack
and attempts to find valid stack frames deeper in
the stack.
.TP
\fBr5\fP [ stack frame ]
Print the program's idea of the start
of the current stack frame (set initially
from a fixed location in the dump)
if no argument is given,
or set the frame pointer to the supplied value.
.TP
.B stack
Format an octal dump of the kernel stack of the
current process.
The addresses shown are virtual system data addresses
rather than true physical locations.
.TP
\fBproc\fP [ \fB\-\fP[\fBr\fP] ] [ list of process table entries ]
Format the process table.
The
.B \-r
option causes only runnable processes to be printed.
The
.B \-
alone generates a longer listing.
.TP
\fBinode\fP [ \fB\-\fP ] [ list of inode table entries ]
Format the inode table.
The
.B \-
option will also print
the inode data block addresses.
.TP
\fBfile\fP [ list of file table entries ]
Format the file table.
.TP
\fBmount\fP [ list of mount table entries ]
Format the mount table.
.ne 4
.TP
\fBtext\fP [ list of text table entries ]
Format the text table.
.TP
\fBtty\fP [ type ] [ \fB\-\fP ] [ list of tty entries ]
Print the tty structures.
The
.I type\^
argument determines which structure will be used (such as
.B kl
or
.BR dh ;
the last
.I type\^
is remembered).
The
.B \-
option prints the
.B stty
parameters for the given line.
.TP
.B stat
Print certain statistics found in the dump.
These include the
panic string, time of crash, system name,
and the registers saved in low memory
by the dump mechanism.
.TP
.B var
Print the tunable system parameters.
.TP
\fBbuf\fP [ list of buffer headers ]
Format the system buffer headers.
.TP
\fBbuffer\fP [ format ] [ list of buffers ]
Print the data in a system buffer
according to
.IR format .
Valid formats include
.BR decimal ,
.BR octal ,
.BR character ,
.BR byte ,
.BR directory ,
.BR inode ,
and
.BR write .
The last creates a file containing the buffer data.
.TP
.B callout
Print all entries in the callout table.
.TP
\fBmap\fP [ list of map names ]
Format the named system map structures.
.TP
\fBnm\fP [ list of symbols ]
Print symbol value and type as found in the
namelist file.
.TP
\fBts\fP [ list of text addresses ]
Find the closest text symbols to the given addresses.
.TP
\fBds\fP [ list of data addresses ]
Find the closest data symbols to the given addresses.
.TP
\fBod\fP [ symbol or data address ] [ count ] [ format ]
Dump
.I count\^
data values
starting at the symbol value or address given
according to
.IR format .
Allowable formats are
.BR octal ,
.BR decimal ,
.BR character ,
or
.BR byte .
.TP
.B !
Escape to shell.
.TP
.B q
Exit from
.IR crash .
.TP
.B ?
Print synopsis of commands.
.SH ALIASES
There are built in aliases for many of the
commands and formats.
In general,
the first letter of a name
is satisfactory, thus,
.B k
is a shorthand notation for
.BR kernel .
Exceptions are
.B x
for
.B text
and
.B e
for
.BR decimal .
.SH FILES
/dev/mem	default system image file
.br
/unix		default namelist file
.br
buf.#		files created containing buffer data
.SH "SEE ALSO"
crash(8).