Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

ldsysdump(8)



  crash(8)                            CLIX                            crash(8)



  NAME

    crash - Examines system images

  SYNOPSIS

    /etc/crash [-d dumpfile] [-n namelist] [-w outputfile]

  DESCRIPTION

    The crash command is used to examine the system memory image of a live or
    a crashed system by formatting and displaying control structures, tables,
    and other information.  Command line arguments to crash are dumpfile,
    namelist, and outputfile.

    The dumpfile is the file containing the system memory image.  The default
    dumpfile is /dev/mem.  The system image can also be /dev/ifdsk06, if the
    first floppy of a system dump is taken with sysdump; or it can be the
    pathname of a file produced by ldsysdump.

    The text file namelist contains the symbol table information needed for
    symbolic access to the system memory image to be examined.  The default
    namelist is /unix.  If a system image from another machine is to be
    examined, the corresponding text file must be copied from that machine.

    When the crash command is invoked, a session is initiated.  The output
    from a crash session is directed to outputfile.  The default outputfile is
    stdout.

    Input during a crash session is of the form:

    function [argument ... ]

    where function is one of the crash functions described in the
    ``FUNCTIONS'' section of this manual page, and arguments are qualifying
    data that indicate which items of the system image are to be displayed.

    The default for process-related items is the current process for a running
    system and the process that was running at the time of the crash for a
    crashed system.  If the contents of a table are being dumped, the default
    is all active table entries.

    The following function flags are available to crash functions wherever
    they are semantically valid.

    -e           Display every entry in a table.

    -f           Display the full structure.

    -p           Interpret all address arguments in the command line as
                 physical addresses.



  2/94 - Intergraph Corporation                                              1






  crash(8)                            CLIX                            crash(8)



    -s process   Specify a process slot other than the default.

    -w file      Redirect the output of a function to file.

    Note that if the -p flag is used, all address and symbol arguments
    explicitly entered on the command line will be interpreted as physical
    addresses.  If they are not physical addresses, results will be
    inconsistent.

    The functions mode, defproc, and redirect correspond to the function flags
    -p, -s, and -w.  The mode function may be used to set the address
    translation mode to physical or virtual for all subsequently entered
    functions; defproc sets the value of the process slot argument for
    subsequent functions; and redirect redirects all subsequent output.

    Output from crash functions may be piped to another program in the
    following way:

    function [argument ... ] ! shell_command

    For example,

    mount ! grep rw

    will write all mount table entries with an rw flag to stdout.  The
    redirection flag (-w) cannot be used with this feature.

    Depending on the context of the function, numeric arguments will be
    assumed to be in a specific radix.  Counts are assumed to be decimal.
    Addresses are always hexadecimal.  Table address arguments larger than the
    size of the function table will be interpreted as hexadecimal addresses;
    those smaller will be assumed to be decimal slots in the table.  Default
    bases on all arguments may be overridden.  The C conventions for
    designating the bases of numbers are recognized.  A number that is usually
    interpreted as decimal will be interpreted as hexadecimal if it is
    preceded by 0x and as octal if it is preceded by 0.  Decimal override is
    designated by 0d, and binary by 0b.

    Aliases for functions may be any uniquely identifiable initial substring
    of the function name.  Traditional aliases of one letter, such as p for
    proc, remain valid.

    Many functions accept different forms of entry for the same argument.
    Requests for table information will accept a table entry number, a
    physical address, a virtual address, a symbol, a range, or an expression.
    A range of slot numbers may be specified in the form a-b where a and b are
    decimal numbers.  An expression consists of two operands and an operator.
    An operand may be an address, a symbol, or a number; the operator may be
    +, -, *, /, &, or |.  An operand which is a number should be preceded by a
    radix prefix if it is not a decimal number (0 for octal, 0x for
    hexadecimal, 0b for binary).  The expression must be enclosed in



  2                                              Intergraph Corporation - 2/94






  crash(8)                            CLIX                            crash(8)



    parentheses ().  Other functions will accept any of these argument forms
    that are meaningful.

    Two abbreviated arguments to crash functions are used throughout.  Both
    accept data entered in several forms.  They may be expanded into the
    following:

    table_entry = table entry|address|symbol|range|expression
    start_addr = address|symbol|expression


  FUNCTIONS

    ? [-w file]
           List available functions.

    !cmd   Escape to the shell to execute a command.

    adv [-e] [-w file] [[-p] table_entry ... ]
           Display the advertise table.

    base [-w file] number ...
           Display number in binary, octal, decimal, and hexadecimal.  A
           number in a radix other then decimal should be preceded by a prefix
           that indicates its radix as follows: 0x, hexadecimal; 0, octal; and
           0b, binary.

    buffer [-w file] [-format] bufferslot
    buffer [-w file] [-format] [-p] start_addr
           Alias: b.

           Display the contents of a buffer in the designated format.  The
           following format designations are recognized: -b, byte; -c,
           character; -d, decimal; -x, hexadecimal; -o, octal; -r, directory;
           and -i, inode.  If no format is given, the previous format is used.
           The default format at the beginning of a crash session is
           hexadecimal.

    bufhdr [-f] [-w file] [[-p] table_entry ... ]
           Alias: buf.

           Display system buffer headers.

           The -f flag produces different output depending on whether the
           buffer is local or remote (contains RFS data).

    callout [-w file]
           Alias: c.

           Display the callout table.




  2/94 - Intergraph Corporation                                              3






  crash(8)                            CLIX                            crash(8)



    dballoc [-w file] [class ... ]
           Display the dballoc table.  If a class is entered, only data block
           allocation information for that class will be displayed.

    dbfree [-w file] [class ... ]
           Display free streams data block headers.  If a class is entered,
           only data block headers for the class specified will be displayed.

    dblock [-e] [-w file] [-c class ... ]
    dblock [-e] [-w file] [[-p] table_entry ... ]
           Display allocated streams data block headers.  If the class flag
           (-c) is used, only data block headers for the class specified will
           be displayed.

    defproc [-w file] [-c]
    defproc [-w file] [slot]
           Set the value of the process slot argument.  The process slot
           argument may be set to the current slot number (-c) or the slot
           number may be specified.  If no argument is entered, the value of
           the previously set slot number is displayed.  At the start of a
           crash session, the process slot is set to the current process.

    dis [-w file] [-a] start_addr [count]
           Disassemble from the start address for count instructions.  The
           default count is 1.  The absolute flag (-a) specifies a nonsymbolic
           disassembly.

    ds [-w file] virtual_address ...
           Display the data symbol whose address is closest to, but not
           greater than, the address entered.

    file [-e] [-w file] [[-p] table_entry ... ]
           Alias: f.

           Display the file table.

    findaddr [-w file] table slot
           Display the address of slot in table.  Only tables available to the
           size function are available to findaddr.

    findslot [-w file] virtual_address ...
           Display the table, entry slot number, and offset for the address
           entered.  Only tables available to the size function are available
           to findslot.

    fs [-w file] [[-p] table_entry ... ]
           Display the file system information table.

    gdp [-e] [-f] [-w file] [[-p] table_entry ... ]
           Display the gift descriptor protocol table.




  4                                              Intergraph Corporation - 2/94






  crash(8)                            CLIX                            crash(8)



    help [-w file] function ...
           Display a description of the named function, including syntax and
           aliases.

    inode [-e] [-f] [-w file] [[-p] table_entry ... ]
           Alias: i.

           Display the inode table, including file system switch information.

    kfp [-w file] [-s process] [-r]
    kfp [-w file] [-s process] [value]
           Display the frame pointer for the start of a kernel stack trace.
           The kfp value can be set using the value argument or the reset flag
           (-r), which sets the kfp through the nvram.  If no argument is
           entered, the current value of the kfp is displayed.

    lck [-e] [-w file] [[-p] table_entry ... ]
           Alias: l.

           Display record locking information.  If the -e flag is used or
           table address arguments are given, the record lock list is
           displayed.  If no argument is entered, information on locks
           relative to inodes is displayed.

    linkblk [-e] [-w file] [[-p] table_entry ... ]
           Display the linkblk table.

    major [-w file] [entry ... ]
           Display the MAJOR table.

    map [-w file] mapname ...
           Display the map structure of the given mapname.

    mbfree [-w file]
           Display free streams message block headers.

    mblock [-e] [-l slot] [-w filename] [[-p] table_entry ... ]
           Display allocated streams message block headers.  The -l flag
           displays the linked list of message block headers starting with the
           specified slot.

    mmu [-w file]
           Alias: regs.

           Display memory management unit registers.  These registers are not
           available on a running system.

    mode [-w file] [mode]
           Set address translation of arguments to virtual (v) or physical (p)
           mode.  If no mode argument is given, the current mode is displayed.
           At the start of a crash session, the mode is virtual.



  2/94 - Intergraph Corporation                                              5






  crash(8)                            CLIX                            crash(8)



    mount [-e] [-w file] [[-p] table_entry ... ]
           Alias: m.

           Display the mount table.

    nm [-w file] symbol ...
           Display value and type for the given symbol.

    nvram [-w file] type
           Display nvram information of one of four types.  The type argument
           may be one of the following: fwnvr, unxnvr, systate, or errlog.

    od [-p] [-w file] [-format] [-mode] [-s process] start_addr [count]
           Alias: rd.

           Display count values starting at the start address in one of the
           following formats: character (-c), decimal (-d), hexadecimal (-x),
           octal (-o), ascii (-a), or hexadecimal/character (-h), and one of
           the following modes:  long (-l), short (-t), or byte (-b).  The
           default mode for character and ascii formats is byte; the default
           mode for decimal, hexadecimal, and octal formats is long.  The
           format -h displays both hexadecimal and character representations
           of the addresses dumped; no mode needs to be specified.  When
           format or mode is omitted, the previous value is used.  At the
           start of a crash session, the format is hexadecimal and the qmode
           is long.  If no count is entered, 1 is assumed.

    pcb [-w file] [-u] [process]
    pcb [-w file] [-k] [process]
    pcb [-w file] [[-p] -i start_addr]
           Display the process control block.  If no arguments are given, the
           active pcb for the current process is displayed.  The user flag
           (-u) displays the user pcb and the kernel flag (-k) displays the
           kernel pcb associated with the process.  The interrupt flag (-i)
           displays the interrupt pcb located at the start address.

    pdt [-e] [-w file] [-s process] section segment
    pdt [-e] [-w file] [-s process] [-p] start_addr [count]
           The page descriptor table of the designated memory section and
           segment is displayed.  Alternatively, the page descriptor table
           starting at the start address for count entries is displayed.  If
           no count is entered, 1 is assumed.

    pfdat [-e] [-w file] [[-p] table_entry ... ]
           Display the pfdata table.

    proc [-e] [-f] [-w file] [[-p] table_entry ... #procid ... ]
    proc [-f] [-w file] [-r]
           Alias: p.

           Display the process table.  Process table information may be



  6                                              Intergraph Corporation - 2/94






  crash(8)                            CLIX                            crash(8)



           specified in two ways.  First, any mixture of table entries and
           process ids may be entered.  Each process ID must be preceded by a
           #.  Alternatively, process table information for runnable processes
           may be specified with the runnable flag (-r).

    qrun [-w file]
           Display the list of scheduled streams queues.

    queue [-e] [-w file] [-d] [[-p] table_entry ... ]
           Display streams queues.  The -d flag displays queues that have data
           associated with them.

    quit   Alias: q.

           Terminate the crash session.

    rcvd [-e] [-f] [-w file] [[-p] table_entry ... ]
           Display the receive descriptor table.

    redirect [-w file] [-c]
    redirect [-w file] [file]
           Used with a filename, redirects output of a crash session to the
           named file.  If no argument is given, the filename to which output
           is being redirected is displayed.  Alternatively, the close flag
           (-c) closes the previously set file and redirects output to stdout.

    region [-e] [-f] [-w file] [[-p] table_entry ... ]
           Display the region table.

    sdt [-e] [-w file] [-s process] section
    sdt [-e] [-w file] [-s process] [-p] start_addr [count]
           The segment descriptor table for the named memory section is
           displayed.  Alternatively, the segment descriptor table starting at
           start address for count entries is displayed.  If no count is
           given, a count of 1 is assumed.

    search [-p] [-w file] [-m mask] [-s process] pattern start_addr length
           Display the words in memory that match pattern, beginning at the
           start address for length words.  The mask is anded (&) with each
           memory word and the result compared against the pattern.  The mask
           defaults to 0xffffffff.

    size [-w file] [-x] [structure_name ... ]
           Display the size of the designated structure.  The (-x) flag
           displays the size in hexadecimal.  If no argument is given, a list
           of the structure names for which sizes are available is displayed.

    sndd [-e] [-f] [-w file] [[-p] table_entry ... ]
           Display the send descriptor table.

    srams [-w file]



  2/94 - Intergraph Corporation                                              7






  crash(8)                            CLIX                            crash(8)



           Display the sram values.

    srmount [-e] [-w file] [[-p] table_entry ... ]
           Display the server mount table.

    stack [-w file] [-u] [process]
    stack [-w file] [-k] [process]
    stack [-w file] [[-p] -i start_addr]
           Alias: s.

           Dump stack.  The (-u) flag displays the user stack.  The (-k) flag
           displays the kernel stack.  The (-i) flag displays the interrupt
           stack starting at the start address.  If no arguments are entered,
           the kernel stack for the current process is displayed.  The
           interrupt stack and the stack for the current process are not
           available on a running system.

    stat [-w file]
           Display system statistics.

    stream [-e] [-f] [-w file] [[-p] table_entry ... ]
           Display the streams table.

    strstat [-w file]
           Display streams statistics.

    trace [-w file] [-r] [process]
    trace [-w file] [[-p] -i start_addr]
           Alias: t.

           Display stack trace.  The kfp value is used with the -r flag.  The
           interrupt option displays a trace of the interrupt stack beginning
           at the start address.  The interrupt stack trace and the stack
           trace for the current process are not available on a running
           system.

    ts [-w file] virtual_address ...
           Display closest text symbol to the designated address.

    tty [-e] [-f] [-w file] [-t type[[-p] table_entry ... ]]
    tty [-e] [-f] [-w file] [[-p] start_addr]
           Valid types: pp, iu.

           Display the tty table.  If no arguments are given, the tty table
           for both tty types is displayed.  If the -t flag is used, the table
           for the single tty type specified is displayed.  If no argument
           follows the type flag, all entries in the table are displayed.  A
           single tty entry may be specified from the start address.

    user [-f] [-w file] [process]
           Alias: u.



  8                                              Intergraph Corporation - 2/94






  crash(8)                            CLIX                            crash(8)



           Display the ublock for the designated process.

    var [-w file]
           Alias: v.

           Display the tunable system parameters.

    vtop [-w file] [-s process] start_addr ...
           Display the physical address translation of the virtual start
           address.

  FILES

    /dev/mem       System image of currently running system

    /dev/ifdsk06   Used to access system image on floppy diskette

  RELATED INFORMATION

    Commands:  ldsysdump(8)


































  2/94 - Intergraph Corporation                                              9




Typewritten Software • bear@typewritten.org • Edmonds, WA 98026