home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / usenet / altsrcs / 2 / 2870 / README < prev    next >
Encoding:
Text File  |  1991-02-28  |  7.8 KB  |  247 lines

  1. crash(1L)                       Version 2.0                     08/11/88
  2.  
  3. Introduction
  4.  
  5. Crash is a utility for examining kernel tables while the system is
  6. running, or if there is a facility for taking crash dumps, examining the
  7. system after it has crashed.  SCO does not provide a crash dump facility
  8. at this time, so that functionality is not present.
  9.  
  10. The kernel structures which can be examined at present are:
  11.  
  12.     block buffer headers
  13.     open file table entries
  14.     active inode table entries
  15.     mounted file system table entries
  16.     process table entries
  17.     system statistics such as name, version, age
  18.     active and sticky bit text table entries
  19.     tty structures
  20.     system namelist
  21.     per process user page information
  22.     tunable parameters
  23.     arbitrary kernel memory addresses
  24.  
  25. Using this information, it is possible to determine what files a given
  26. process is using, what device they reside on, who owns them and where
  27. the file pointer is currently positioned.  Other information on running
  28. processes may also be determined.
  29.  
  30. This version of crash differs from most other versions, such as that
  31. produced by AT&T for their UNIX(tm) systems, in that swapped user pages
  32. may be printed and the name for swapped processes is given.  Also, not
  33. all of the aliases which are listed in the manual page from AT&T are
  34. provided.  A number of commands have been left out, and some of the
  35. options for the included commands have been omitted as well.
  36.  
  37. Commands
  38.  
  39. Most commands take a list of table entries, which if not present
  40. defaults to all elements in the table.
  41.  
  42. Print Buffer Headers
  43. Syntax:    buf, b
  44.  
  45. Prints the selected block buffer headers.
  46.  
  47. Example:
  48. > buf 0 1 2 3 4
  49.  BUF MAJ  MIN    BLOCK FLAGS
  50.    0 001 0047    20925 read done
  51.    1 001 0037     2817 read done
  52.    2 001 0050     2801 read done
  53.    3 001 0037    15175 read done
  54.    4 001 0050        6 done
  55.  
  56. Print Open File Table Entries
  57. Syntax: file, f
  58.  
  59. Prints the selected open file table entries, with cross references
  60. to the associated inodes, and the current file pointer.
  61.  
  62. Example:
  63. > file 0 1 2 3 4
  64. SLOT    FLAG          COUNT  INODE      OFFSET
  65.    0    001 R             1      9           0
  66.    1    003 RW            3      3          18
  67.    2    003 RW            7     11       26800
  68.    3    002  W            2      4         169
  69.    4    001 R             1      8           0
  70.  
  71. Display Command Summary
  72. Syntax: help, h, ?
  73.  
  74. Prints the list of currently available commands and the aliases
  75. for them.
  76.  
  77. Example:
  78. > help
  79. command summary
  80.  
  81. buf (b)        - buffer headers
  82. file (f)       - open files
  83. help (h,?)     - list commands
  84. inode (ino,i)  - active inodes
  85. mount (m)      - mounted file systems
  86. proc (p)       - active and defunct processes
  87. quit (q,^D)    - exit crash
  88. stat (s)       - crash statistics, age, time
  89. text (t)       - active and sticky bit text segments
  90. user (u)       - user page information
  91. var (v)        - tunable parameters
  92.  
  93. Display Active Inode Table Entries
  94. Syntax: inode, ino, i
  95.  
  96. Prints selected active inode table entries giving device, file
  97. size, permissions, and owners.  Cross referenced from mount and
  98. file tables.
  99.  
  100. Example:
  101. > inode 0 2 6 8 20
  102. SLOT MAJ  MIN INUMB REF LINK  UID  GID     SIZE    MODE SMAJ SMIN FLAGS
  103.    0 001 0050     2   5   13    0    0      464 d---755    -    -
  104.    2 001 0050    44   1    1    3    3    13472 f---700    -    - txt
  105.    6 001 0050   204   1    2    0    0       32 d---777    -    - mnt
  106.    8 001 0050    87   2    1   10   10        0 c---666 0004 0002
  107.   20 001 0050   471   1    1    3    3    50102 f---711    -    - acc txt
  108.  
  109. Display Mounted File System Table Entries
  110. Syntax: mount, m
  111.  
  112. Prints the system entries for mounted on file systems.  The
  113. device, mount point, file system sizes and free blocks and inodes
  114. are displayed.
  115.  
  116. Example:
  117. > mount
  118. SLOT  MAJ  MIN  INODE  BUF  VOLUME  PACK   BLOCKS INODES  BFREE  IFREE
  119.    0    1  050      0   10                   7163   1808   1237   1251
  120.    1    1  037      6  230  usr     rpp386  34000  17024   1320  14238
  121.    2    1  047      7  245                  22950  15024   5499   9800
  122.    3    2  064     23  387                   1200    320    210     50
  123.  
  124. Display Process Table Entries
  125. Syntax: proc, p
  126.  
  127. Prints selected running and defunct process information.  The process
  128. ids, user ids, CPU usage, scheduling priority and wait event are
  129. displayed.  The process name is determined by locating the user page.
  130.  
  131. Example:
  132. > proc 0 1 2 3 4
  133. SLT ST  PID  PPID  PGRP   UID  EUID PRI CPU    EVENT NAME       FLAGS
  134.   0 s     0     0     0     0     0   0  15    16c5c swapper    incore sched
  135.   1 s     1     0     0     0     0  30   0     eeac init       incore text
  136.   2 s  9389     1  9389   100   100  30   0     ef54 csh        incore text
  137.   3 s    31     1     0     0     0  26   0     5eac logger     swapped
  138.   4 s    30     1     0     0     0  40   0  6000000 update     incore text
  139.  
  140. Exit Crash Command
  141. Syntax: quit, q, ^D
  142.  
  143. Exits Crash.
  144.  
  145. Example:
  146. > quit
  147. $
  148.  
  149. Print System Statics
  150. Syntax: stat, s
  151.  
  152. Prints information regarding system name, operating system release, version,
  153. date of crash, and uptime at time of crash.
  154.  
  155. Example:
  156. > stat
  157.     sysname: XENIX
  158.     nodename: rpp386
  159.     release: 2.2.1
  160.     version: SysV
  161.     machine: i80386
  162.     time of crash: Thu Aug 11 11:18:00 1988
  163.     age of system: 35 days, 23 hrs., 7 mins.
  164.  
  165. Print Text Table Entries
  166. Syntax: text, t
  167.  
  168. Prints current text table entries.  Cross references to inode number
  169. and process table entry and gives the number of processes which are
  170. currently referencing this table entry.
  171. Example:
  172. > text 0 1 2 3 4
  173. SLOT  INODE  REF  LDREF  PROC  SWAPLO+   SIZE  FLAGS
  174.    0      2    1      1     1        0      0  write
  175.    1     20    2      1     9        0      0  write
  176.    2      5    1      1     4        0      0  write
  177.    3     10    1      0     0        0      0  write
  178.    4     21    1      1    10        0      0  write
  179.  
  180. Print Per Process User Page Information
  181. Syntax: user, u
  182.  
  183. Prints the user page for the current process or a group of processes.
  184. The argument is the process table slot.  If omitted, the currently
  185. running process, which will invariably be crash, user page will be
  186. displayed.  Information includes user and system times, user and
  187. group ids, file I/O, system accounting and open file information.
  188. Provides a list of currently open files by file table entry number.
  189.  
  190. Example:
  191. > user
  192. PER PROCESS USER AREA:
  193. USER ID's:    uid: 100, gid: 0, real uid: 100, real gid: 0
  194. PROCESS TIMES:    user: 16, sys: 22, child user: 0, child sys: 0
  195. PROCESS MISC:    proc slot: 10, cntrl tty: maj(0) min(0)
  196. IPC:        locks: unlocked
  197. FILE I/O:    user addr: 25703640, file offset: 100665344, bytes: 1892,
  198.         segment: user, umask: 22, ulimit: 2097152
  199. ACCOUNTING:    command: crash, memory: 1987167, type: exec
  200.         start: Thu Aug 11 11:28:10 1988
  201. OPEN FILES:    file desc:     0   1   2   3   4   5
  202.         file slot:    11  13  13  18  19  20
  203.  
  204. Print Tunable Parameter Information
  205. Syntax: var, v
  206.  
  207. Displays the tunable parameter values which were used at the time
  208. of system generation.  Included are number of open files, processes
  209. per user, inodes, mounts, pure text entries and other related
  210. information.
  211.  
  212. Example:
  213. > var
  214. buffers      512
  215. calls       30
  216. inodes      100
  217. e_inodes  100
  218. files      100
  219. e_files      100
  220. mounts        8
  221. e_mounts    8
  222. procs       60
  223. e_procs       16
  224. texts       40
  225. e_texts       40
  226. clists       64
  227. sabufs       64
  228. maxproc       30
  229. hashbuf      512
  230. hashmask  511
  231.  
  232. Caveats and Features
  233.  
  234. This release of crash is known to run under SCO Xenix 2.2.3.  No other
  235. ports are presently known of.  For the most part, porting to a different
  236. release of Xenix should be quite painless.  The principle changes are
  237. likely to be in the user area, process table entries, and system namelist
  238. functions.
  239.  
  240. None of the options are presently implemented.  Commands which have been
  241. implemented have only one format.
  242.  
  243. Most of the commands are available as command line options.  Use the one
  244. letter command alias as the command line option.  The output defaults
  245. to what it would be if that one letter alias were issued to crash as a
  246. command.  Multiple flags may be given.  When in doubt, read the source.
  247.