CRASH(8,C) AIX Commands Reference CRASH(8,C)
-------------------------------------------------------------------------------
crash
PURPOSE
Examines system images.
SYNTAX
+- -d /dev/kem -+ +- -n /unix -----+ +------+
crash --| |--| |--| |--|
+- -d dump -----+ +- -n namelist --+ +- -a -+
DESCRIPTION
The crash command is an interactive utility for examining an operating system
image (a core image or the running kernel). It has facilities for interpreting
and formatting the various control structures in the system and certain
miscellaneous functions useful for examining a dump.
When run without the -d flag, the crash command examines an active system. If
you specify dump, the crash command assumes that it is a system dump file, and
it sets the default process to the process running at the time of the crash.
When specifying namelist file you must select the file from which the running
system was booted if the -d flag is not specified. Otherwise, you must select
the file from which the system was booted before the system dump was performed.
Notes:
1. While using the crash command, it may be helpful to have a source listing
of the system header which identifies the flags the crash command uses.
2. Stack tracing of the current process on a running system does not work.
The crash command recognizes several aliases in the format specification
accompanying the subcommands.
Format Aliases Format Aliases
byte b inode ino, i
character char, c longdec ld, D
decimal dec, e longoct lo, O
directory direct, dir, d octal oct, o
hexadecimal hexadec, hex, h, x write w
PARAMETERS
Processed November 8, 1990 CRASH(8,C) 1
CRASH(8,C) AIX Commands Reference CRASH(8,C)
The crash command presents a prompt (">") when it is ready to interpret
subcommands entered at the work station. The general subcommand format for
crash is:
subcommand [flags] [structures to be displayed]
When allowed, flags modify the format of the data displayed. If you do not
specify which structure elements you want to examine, all valid entries are
displayed. In general, those subcommands that perform I/O with addresses
assume hexadecimal notation.
Some of the subcommands recognized by the crash command have aliases
(abbreviated forms that give the same result). If a subcommand has an alias,
it is listed below. The crash command recognizes the following subcommands:
active [-]
Displays only active entries. When the - option is used, active displays
all entries.
addr [table-index]
Alias: a. Displays the address of an item in an array (for example, the
procedure table).
all
Displays all information available.
buf [list-of-buffer-headers]...
Alias: b. Displays the system buffer headers.
buffer [format][list-of-buffers]...
Aliases: bufhdr, hdr. Displays the data in a system buffer according to
format. If you do not provide a format parameter, the previous format
parameter you specified is used. Valid format parameters include decimal,
octal, hex, character, byte, directory, inode and write. The write
parameter creates a file in the current directory containing the buffer
data.
bufhash [list-of-hash-chains]
Alias: bufh. Displays the buffer hash chains.
buflist [queue] Alias: bufl
Displays the buffer free list.
callout Aliases: calls, call, c, timeout, time, tout
Displays all entries in the callout table.
dcache Alias: dca
Displays information in the directory cache.
ds [list-of-data-addresses]...
Finds the data symbols closest to the given addresses.
Processed November 8, 1990 CRASH(8,C) 2
CRASH(8,C) AIX Commands Reference CRASH(8,C)
dump [sym or addr] [cnt or -] [fmt or -] [proc-list]
Aliases: od, hd, rd. Dumps cnt data values starting at the symbol name
sym or address addr given. Allowable format parameters for fmt are octal,
decimal, character, hex, or byte. The default format is hex. The - flags
for cnt and fmt are necessary only if you use proc-list.
file [-i islot][list-of-file-table-entries]... Aliases: files, f
Displays the file table. Unless specific file entries are requested, only
those with a nonzero reference are displayed.
gensw
Displays information in the gensw structure.
header [-v]
Displays core header. When the -v option is used, header displays the
contents of the dump directory.
help Alias: ?
Displays a summary of crash commands.
inode [-l] [-f] [-n] [g gfs] [-i ino] [inode-slots]
Alias: ino, i. Displays the inode table. Unless specific inode-slots are
requested, only those with a non-zero reference are displayed. The record
lock structure is displayed when using the -l option. The -n option
displays the NFS inodes only. The -f option displays the FIFO inodes
only. When g gfs is specified, inode displays the inodes listed in gfs.
When -i ino is specified, inode displays the all inode slots where the
inode number equals ino.
malloc [-] [count[addr]] Alias: mall
Traces malloc chain starting at address addr showing count links in the
chain. The - option shows the amount of free space available.
mount [-l] [-n] [list-of-gfs-numbers]
Alias: mnt, m. Displays the mount table. Unless the list-of-gfs-numbers
option is used, mount displays only those mount tables that are in use.
When the -l option is used, mount displays the local entries only. When
the -n option is used, mount displays the NFS entries only.
netbuf [-a] [-l] [-v] [list-of-netmsg-slots]
Alias: netb, netmsg. Displays net message buffers. When the -a flag is
used, netbuf displays the most common fields. When the -l flag is used,
netbuf displays both the common and variant portions of netbuf. When the
-v flag is used, netbuf displays only the variant fields.
netlist
Displays net message free list and nmheader.
netlog [-s siteno] [-{1,2,3} value] [n]
Displays the log of recent net messages. The n option indicates the
number of entries to display (default is all). The -s siteno option
restricts the net messages to the given site. The -1, -2, and -3 flags
Processed November 8, 1990 CRASH(8,C) 3
CRASH(8,C) AIX Commands Reference CRASH(8,C)
are used to filter the net messages. -1 value restricts net messages to
those whose long field matches value. -2 value restricts net messages to
those whose short field matches value. -3 value restricts net messages to
those whose long2 field matches value.
netswitch Alias: netsw
Displays information in the net switch structure.
nm [list-of-symbols]...
Displays symbol address as found in the kernel-image file.
osm [bytecnt] Aliases: printf, printfs
Displays the most recent messages printed on the console.
pcb
Displays information about the process control block.
plock [-tdu]
Lock crash into memory. With no options, text, data, and user structure
are locked. The -t flag causes only text to be locked. The -d flag
causes only data to be locked. The -u flag causes all locks to be
released.
proc [-alp] [list-of-processes]
Alias: p. Displays the process table. (See the /usr/include/sys/proc.h
file for this structure definition.) The -l flag displays only runable
processes. The -p flag displays list-of-processes, which is a list of
PIDs. The -a flag displays all information to be displayed.
prop
Displays propagation list.
pvseg [-p] [-q] [list-of-processes]
Displays the vseg structure of processes. If no list is given,
information about the current running process is displayed. If -q is
specified, the vsegs for all processes are displayed. If -p is specified,
the list-of-processes should be PIDs, not process slots.
quit Alias: q
Exits from the crash command.
rmsleep Alias: rms
Displays remote sleep table.
rmwakeup Alias: rmw
Displays remote wakeup table.
site [list-of-site-numbers]
Displays information in the site table and site data.
Processed November 8, 1990 CRASH(8,C) 4
CRASH(8,C) AIX Commands Reference CRASH(8,C)
slot [list-of-addresses] Alias: s
Displays the name and slot for a given address.
sptab Alias: sp
Displays server process table information.
stack [process]... Alias kernel, k
Displays a dump of the kernel stack of a process. The addresses shown are
virtual data addresses rather than true physical locations. If you do not
specify an entry, information about the last running process is displayed.
You can not trace the stack of the current process on a running system.
stat
Displays statistics found in the dump. These include the panic message
(if a panic occurred), the time of the crash, and the system name.
tabgrow Alias: systab
Displays how many slots in all system tables are used and how many are
available.
token [-] [list-of-token-slots] Alias: tok
Displays token control block table. The - flag provides additional
information.
tokreq [list-of-file-numbers]
Displays token site request table information for the
list-of-site-numbers. If no list is given, tokreq displays the table
information for the site on which it was executed.
topology Alias: top
Displays the topology status.
trace [-p] [list-of-processes]
Alias: t. Displays a kernel stack trace of the current process. The
trace starts at the bottom of the stack and attempts to find valid stack
frames. The -p flag displays list-of-processes, which is a list of PIDs.
ts [list-of-text-addresses]...
Finds the text symbols closest to the given addresses.
tty [type] [-] [tty-entry]... Aliases: term, dz, dh
Displays the tty structures. The type parameter specifies which structure
is used (such as ksr, or rs). The last type entered with the tty command
becomes the default. The - (minus) flag displays the stty command
parameters for the given line.
usage [command-list]
Displays the syntax for the given command.
user [-] [list-of-processes]... Aliases: uarea, u_area, u
Displays the user structure of the named process as determined by the
information contained in the process table entry. (See the
Processed November 8, 1990 CRASH(8,C) 5
CRASH(8,C) AIX Commands Reference CRASH(8,C)
/usr/include/sys/user.h file for this structure definition.) If you do
not specify the entry, the information about the last running process is
displayed. Attempting to display a paged process produces an error
message. If - is specified, list-of-processes should be a list of PIDs.
var Aliases: tunables, tunable, tune, v
Displays the tunable system parameters.
vseg
Displays kernel vseg structures.
!
Runs shell commands.
FLAGS
-d dump Specifies the file containing the system image to be
examined. The default file is /dev/kmem.
-n namelist Specifies the file containing the kernel symbol
definitions. The default file is /unix.
-a Prints all useful information and then exits.
FILES
/usr/include/sys/*.h Header files for table and structure information.
/dev/kmem Default system-image file.
/unix Default name list file.
buf.# Files containing buffer data.
RELATED INFORMATION
See the following commands: "mount," "nm," "ps," "sh, Rsh," and "stty,
STTY."
Processed November 8, 1990 CRASH(8,C) 6