


CRASH(8)              MAINTENANCE COMMANDS               CRASH(8)



NAME
     crash - examine system images

SYNOPSIS
     /etc/crash [ -d _d_u_m_p-_f_i_l_e  ]  [  -n  _n_a_m_e_l_i_s_t-_f_i_l_e  ]  [  -w
     _o_u_t_p_u_t-_f_i_l_e ]

DESCRIPTION
     crash examines the memory image of a live or a crashed  sys-
     tem kernel.  It displays the values of system control struc-
     tures, tables, and other pertinent information.

OPTIONS
     -d _d_u_m_p-_f_i_l_e
                 Specify the file containing  the  system  memory
                 image.  The default is /dev/mem.

     -n _n_a_m_e_l_i_s_t-_f_i_l_e
                 Specify the  text  file  containing  the  symbol
                 table  for  symbolic access to the memory image.
                 The default is /vmunix.  If a system image  from
                 another  machine  is  to  be examined, the image
                 file must be copied from that machine.

     -w _o_u_t_p_u_t-_f_i_l_e
                 Specify a file for crash output.  The default is
                 the standard output.

USAGE
     For commands that pertain to a process, the default  process
     is  the  one  currently running on a live system, or the one
     that was running at the time the system crashed.

     If the contents of a table are being dumped, the default  is
     all active table entries.

  Numeric Notation
     Depending on the command, numeric arguments are  assumed  to
     be  in  a  specific base.  Counts are assumed to be decimal.
     Addresses are always hexadecimal.   Table  addresses  larger
     than the size of the specified table are interpreted as hex-
     adecimal addresses; smaller arguments are assumed to  be  in
     decimal.   The  default base of any argument may be overrid-
     den; the C conventions for designating the base of a  number
     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.)

  Expressions
     Many commands accept several forms of an argument.  Requests
     for  table  information  accept  a  table  entry  number,  a



Sun Release 4.1   Last change: 26 October 1988                  1






CRASH(8)              MAINTENANCE COMMANDS               CRASH(8)



     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  expres-
     sion  consists  of two operands and an operator.  An operand
     may be an address, a symbol, or a number. The  operator  may
     be  "+"  (plus  sign), "-" (minus sign), "*" (multiplication
     symbol), "/" (division symbol), "&" (logical  AND),  or  "|"
     (logical  OR).  An  operand which is a number should be pre-
     ceded by a radix prefix if it is not a decimal number (0 for
     octal,  0x  for hexidecimal, 0b for binary).  The expression
     must be enclosed  in  `()'  (parentheses).   Other  commands
     accept any of these argument forms that are meaningful.

     Two  abbreviated  arguments  to  crash  commands  are   used
     throughout.   Both  accept data entered in several forms.  A
     _t_a_b_l_e__e_n_t_r_y argument may be an  address,  symbol,  range  or
     expression  that  resolves  to  one  of these.  A _s_t_a_r_t__a_d_d_r
     argument may be  an  address,  symbol,  or  expression  that
     resolves to one of those.

  Commands
     ? [ -w _f_i_l_e_n_a_m_e ]
          List available commands.

               -w _f_i_l_e_n_a_m_e
                    Redirect the output of a command to the named
                    file. Corresponds to the redirect command.

     !_c_o_m_m_a_n_d
          Escape to the shell to execute a command.

     adv [ -ep ] [ -w _f_i_l_e_n_a_m_e ] [ _t_a_b_l_e__e_n_t_r_y ] ...
          Print the advertise table.

               -e   Display every entry in a table.

               -p   Interpret all address arguments in  the  com-
                    mand  line  as physical addresses.  With this
                    option,  all  address  and  symbol  arguments
                    explicitly  entered  on  the command line are
                    interpreted    as     physical     addresses.
                    Corresponds to the mode command.

     as [ -wfilename ] [ -p ] _p_r_o_c__e_n_t_r_y| #_p_i_d [ s ] ]
          Print the address space table.

     base [ -w _f_i_l_e_n_a_m_e ] _n_u_m_b_e_r ...
          Print _n_u_m_b_e_r in binary,  octal,  decimal,  and  hexade-
          cimal. A number in a radix other then decimal should be
          preceded by a prefix that indicates its radix  as  fol-
          lows: 0x, hexidecimal; 0, octal; and 0b, binary.




Sun Release 4.1   Last change: 26 October 1988                  2






CRASH(8)              MAINTENANCE COMMANDS               CRASH(8)



     buffer [ -w _f_i_l_e_n_a_m_e ] [ -_f_o_r_m_a_t ] _b_u_f_f_e_r_s_l_o_t
     buffer [ -p ] [ -w _f_i_l_e_n_a_m_e ] [ -_f_o_r_m_a_t ] _s_t_a_r_t__a_d_d_r
          Alias: b.
          Print the contents of a buffer in the  designated  for-
          mat.  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 for-
          mat at the beginning of a crash session is hexadecimal.

     bufhdr [ -fp ] [ -w _f_i_l_e_n_a_m_e ] [ _t_a_b_l_e__e_n_t_r_y ] ...
          Alias: buf.
          Print system buffer headers.

               -f   Display the full structure.

     callout
          [ -w _f_i_l_e_n_a_m_e ]
          Alias: c.
          Print the callout table.

     ctx [ -w_f_i_l_e_n_a_m_e ] [ [ -p ] _t_b_l__e_n_t_r_y...  ]
          Print the context table.

     dbfree
          [ -w _f_i_l_e_n_a_m_e ]
          Print free streams data block headers.  If a  class  is
          entered,  only  data block headers for the class speci-
          fied will be printed.

     dblock
          [ -ep ] [ -w _f_i_l_e_n_a_m_e ] [ _d_b_l_k__a_d_d_r ] ...
          Print allocated streams data  block  headers.   If  the
          class  option (-c) is used, only data block headers for
          the class specified will be printed.

     defproc
          [ -c ] [ -w _f_i_l_e_n_a_m_e ]
     defproc
          [ -w _f_i_l_e_n_a_m_e ] [ _s_l_o_t ]
          Set the value of the process slot argument.   The  pro-
          cess  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 printed.  At the start of a  crash  ses-
          sion, the process slot is set to the current process.

     ds [ -w _f_i_l_e_n_a_m_e ] _v_i_r_t_u_a_l__a_d_d_r_e_s_s ...
          Print the data symbol whose address is closest to,  but
          not greater than, the address entered.





Sun Release 4.1   Last change: 26 October 1988                  3






CRASH(8)              MAINTENANCE COMMANDS               CRASH(8)



     file [ -ep ] [ -w _f_i_l_e_n_a_m_e ] [ _t_a_b_l_e__e_n_t_r_y ] ...
          Alias: f.
          Print the file table.

     findaddr [ -w _f_i_l_e_n_a_m_e ] _t_a_b_l_e _s_l_o_t
          Print the address of _s_l_o_t in _t_a_b_l_e.  Only tables avail-
          able to the size command are available to findaddr.

     gdp [ -efp ] [ -w _f_i_l_e_n_a_m_e ] [ _t_a_b_l_e__e_n_t_r_y ] ...
          Print the gift descriptor protocol table.

     help [ -w _f_i_l_e_n_a_m_e ] _c_o_m_m_a_n_d ...
          Print a description of  the  named  command,  including
          syntax and aliases.

     inode [ -f ] [ -w _f_i_l_e_n_a_m_e ] [ _t_a_b_l_e__e_n_t_r_y ] ...
          Alias: i.
          Print the inode table,  including  file  system  switch
          information.

     kfp [ -r ] [ -s _p_r_o_c_e_s_s ] [ -w _f_i_l_e_n_a_m_e ]
     kfp [ -s _p_r_o_c_e_s_s ] [ -w _f_i_l_e_n_a_m_e ] [ _v_a_l_u_e ]
          Print the frame pointer for the start of a kernel stack
          trace.   The kfp value can be set using the value argu-
          ment or the reset  option  (-r),  which  sets  the  kfp
          through  the  nvram.   If  no  argument is entered, the
          current value of the kfp is printed.

               -s _p_r_o_c_e_s_s  Specify a process slot other than  the
                           default.  Corresponds  to  the defproc
                           command.

     linkblk [ -ep ] [ -w _f_i_l_e_n_a_m_e ] [ _t_a_b_l_e__e_n_t_r_y ] ...
          Print the linkblk table.

     map [ -w _f_i_l_e_n_a_m_e ] _m_a_p_n_a_m_e ...
          Alias: m.
          Print the map structure of _m_a_p_n_a_m_e.

     mbfree [ -w _f_i_l_e_n_a_m_e ]
          Print free streams message block headers.

     mblock [ -ep ] [ -w _f_i_l_e_n_a_m_e ] [ _m_b_l_k__a_d_d_r ] ...
          Print allocated streams message block headers.

     mode [ -w _f_i_l_e_n_a_m_e ] [ _m_o_d_e ]
          Set address translation of arguments to virtual (v)  or
          physical  (p)  mode.  If no mode argument is given, the
          current mode is printed.  At the start of a crash  ses-
          sion, the mode is virtual.





Sun Release 4.1   Last change: 26 October 1988                  4






CRASH(8)              MAINTENANCE COMMANDS               CRASH(8)



     mount [ -p ] [ -w _f_i_l_e_n_a_m_e ] [ _t_a_b_l_e__e_n_t_r_y ] ...
          Alias: m.
          Print the mount table.

     nm [ -w _f_i_l_e_n_a_m_e ] _s_y_m_b_o_l ...
          Print value and type for the given symbol.

     od [ -p ] [ -w _f_i_l_e_n_a_m_e ] [ -_f_o_r_m_a_t ] [ -_m_o_d_e ] [ -s _p_r_o_c_e_s_s
          ] _s_t_a_r_t__a_d_d_r [ _c_o_u_n_t ]
          Alias: rd.
          Print _c_o_u_n_t values starting at the start address in one
          of the following formats:

               -c   character
               -d   decimal
               -x   hexadecimal
               -o   octal
               -a   ASCII
               -h   hexadecimal character

          and one of the following modes:

               -l   long
               -t   short
               -b   byte

          The default mode for character  and  ASCII  formats  is
          byte;  the  default  mode for decimal, hexadecimal, and
          octal formats is long.  The format -h prints both hexa-
          decimal  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  mode  is  long.   If  no  count  is  entered, 1 is
          assumed.

     page [ -e ] [ -w_f_i_l_e_n_a_m_e ] [ [ -p ] _t_b_l__e_n_t_r_y ] ...
          Alias: p.
          Print the page structures.

     pcb [ -w _f_i_l_e_n_a_m_e ] [ _p_r_o_c_e_s_s ]
          Print the process control block.  If no  arguments  are
          given,  the  active  pcb  for  the  current  process is
          printed.  -ep

     pment [ -p ] [ -w_f_i_l_e_n_a_m_e ] _t_b_l__e_n_t_r_y ...
          Print the  page  map  entry  table  (not  available  on
          machines with a sun3x kernel architecture).

     pmgrp [ -w_f_i_l_e_n_a_m_e ] [ [ -p ] _t_b_l__e_n_t_r_y...  ]
          Print the  page  map  group  table  (not  available  on
          machines with a sun3x kernel architecture).



Sun Release 4.1   Last change: 26 October 1988                  5






CRASH(8)              MAINTENANCE COMMANDS               CRASH(8)



     proc [ -fp ] [ -w _f_i_l_e_n_a_m_e ] [ #_p_i_d ] ...  [  _t_a_b_l_e__e_n_t_r_y  ]
          ...
     proc [ -fr ] [ -w _f_i_l_e_n_a_m_e ]
          Print the process table.  Process table information may
          be  specified in two ways.  First, any mixture of table
          entries and process IDs (PID) may be entered.  Each PID
          must be preceded by a `#' (pound sign).  Alternatively,
          process table information for runnable processes may be
          specified with the runnable option (-r).

     qrun [ -w _f_i_l_e_n_a_m_e ]
          Print the list of scheduled streams queues.

     queue [ -p ] [ -w _f_i_l_e_n_a_m_e ] [ _q_u_e_u_e__a_d_d_r ] ...
          Print stream queues.

     quit Alias: q.
          Terminate the crash session.

     rcvd [ -efp ] [ -w _f_i_l_e_n_a_m_e ] [ _t_a_b_l_e__e_n_t_r_y ] ...
          Print the receive descriptor table.

     redirect [ -c ] [ -w _f_i_l_e_n_a_m_e ]
     redirect [ -w _f_i_l_e_n_a_m_e ] [ _f_i_l_e_n_a_m_e ]
          Alias: rd.
          Used with a name, redirects output of a  crash  session
          to  the  named  file. If no argument is given, the file
          name to which output is being  redirected  is  printed.
          Alternatively,  the close option (-c) closes the previ-
          ously set file and redirects  output  to  the  standard
          output.   To  pipe  output from a single crash command,
          use an exclamation point followed by a shell command:
               _c_r_a_s_h-_c_o_m_m_a_n_d ! _s_h_e_l_l-_c_o_m_m_a_n_d

          This is not available when -w is in effect.

     search [ -p ] [ -m _m_a_s_k ] [ -s _p_r_o_c_e_s_s ]  [  -w  _f_i_l_e_n_a_m_e  ]
          _p_a_t_t_e_r_n  _s_t_a_r_t__a_d_d_r  _l_e_n_g_t_h
          Alias: s.
          Print the words in memory that match _p_a_t_t_e_r_n, beginning
          at  the  start  address  for _l_e_n_g_t_h words.  The mask is
          ANDed (&) with each memory word and the result compared
          against the pattern.  The mask defaults to 0xffffffff.

     seg [ -w_f_i_l_e_n_a_m_e ] [ [ -p ] _p_r_o_c__e_n_t_r_y ]
     seg [ -w_f_i_l_e_n_a_m_e ] [ #_p_r_o_c_i_d...  ]
          Print the segment table of process.
     segdata [ -w_f_i_l_e_n_a_m_e ] [ [ -p ] _p_r_o_c__e_n_t_r_y ]
     segdata [ -w_f_i_l_e_n_a_m_e ] [ #_p_r_o_c_i_d...  ]
          Print the segment data of process.
     size [ -x ] [ -w _f_i_l_e_n_a_m_e ] [ _s_t_r_u_c_t_u_r_e__n_a_m_e ... ]
          Print the size of the  designated  structure.   The  -x



Sun Release 4.1   Last change: 26 October 1988                  6






CRASH(8)              MAINTENANCE COMMANDS               CRASH(8)



          option  prints the size in hexadecimal.  If no argument
          is given, a list of the structure names for which sizes
          are available is printed.
     sndd [ -efp ] [ -w _f_i_l_e_n_a_m_e ] [ _t_a_b_l_e__e_n_t_r_y ] ...
          Print the send descriptor table.
     srmount [ -ep ] [ -w _f_i_l_e_n_a_m_e ] [ _t_a_b_l_e__e_n_t_r_y ] ...
          Print the server mount table.
     stack [ -u ] [ -w _f_i_l_e_n_a_m_e ] [ _p_r_o_c_e_s_s ]
     stack [ -k ] [ -w _f_i_l_e_n_a_m_e ] [ _p_r_o_c_e_s_s ]
     stack [ -p ] [ -w _f_i_l_e_n_a_m_e ] -i _s_t_a_r_t__a_d_d_r ]
          Alias: s.
          Dump stack.  The -u option prints the user stack.   The
          -k  option  prints  the  kernel  stack.   The -i option
          prints  the  interrupt  stack  starting  at  the  start
          address.  If no arguments are entered, the kernel stack
          for the current  process  is  printed.   The  interrupt
          stack  and  the  stack  for the current process are not
          available on a running system.

     status [ -w _f_i_l_e_n_a_m_e ]
          Print system statistics.

     stream [ -efp ] [ -w _f_i_l_e_n_a_m_e ] [ _t_a_b_l_e__e_n_t_r_y ] ...
          Print the streams table.

     strstat [ -w _f_i_l_e_n_a_m_e ]
          Print streams statistics.

     trace [ -r ] [ -w _f_i_l_e_n_a_m_e ] [ _p_r_o_c_e_s_s ]
     trace [ -p ] [ -w _f_i_l_e_n_a_m_e ] -i _s_t_a_r_t__a_d_d_r ]
          Alias: t.
          Print stack trace.  The kfp value is used with  the  -r
          option.   The  interrupt  option  prints 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 _f_i_l_e_n_a_m_e ] _v_i_r_t_u_a_l__a_d_d_r_e_s_s ...
          Print closest text symbol to the designated address.

     user [ -f ] [ -w _f_i_l_e_n_a_m_e ] [ _p_r_o_c_e_s_s ]
          Alias: u.
          Print the ublock for the designated process.

     vfs [ -w_f_i_l_e_n_a_m_e ] [ [ -p ] _t_b_l__e_n_t_r_y...  ]
          Print the vfs table.

     vnode [ -w_f_i_l_e_n_a_m_e ] [ [ -p ] _a_d_d_r ]
          Alias: v.
          Print the vnode table.





Sun Release 4.1   Last change: 26 October 1988                  7






CRASH(8)              MAINTENANCE COMMANDS               CRASH(8)



     vtop [ -s _p_r_o_c_e_s_s ] [ -w _f_i_l_e_n_a_m_e ] _s_t_a_r_t__a_d_d_r ...
          Print the physical address translation of  the  virtual
          start address.

FILES
     /dev/mem                 system image of  currently  running
                              system
     /var/crash/_m_a_c_h_i_n_e/vmcore._N
     /var/crash/_m_a_c_h_i_n_e/vmunix._N

SEE ALSO
     savecore(8)











































Sun Release 4.1   Last change: 26 October 1988                  8



