crash extension modules
Crash extension modules are required to #include the defs.h file from the top-level directory of crash source tree. There are two suggested manners for building a module:
  1. Hand-compile the module's .so shared object file like this:

      $ gcc -nostartfiles -shared -rdynamic -o <module>.so <module>.c -fPIC -D<machine-type> $(TARGET_CFLAGS)

    where <machine-type> is X86, X86_64, IA64, PPC64, S390 or S390X, and where $(TARGET_CFLAGS) is -D_FILE_OFFSET_BITS=64 on 32-bit architectures, and -m64 on ppc64.

    As a convenience, the crash utility's crash-<release>.src.rpm package builds a crash-devel sub-package, which installs defs.h into /usr/include/crash/defs.h.

  2. Alternatively, copy the module's .c source file to the crash-<release>/extensions subdirectory. Then, from the top-level crash-<release> directory, enter:

      $ make extensions

    If the default compile line does not suffice, create an accompanying .mk makefile with the same prefix as the .c file, copy it to the crash-<release>/extensions subdirectory, and enter the same command as above.

To add the module's command(s) to a running crash session, enter:

  crash> extend <path-to>/<module>.so

The command(s) registered by the extension module will appear in the crash help menu. The module can be installed automatically if the extend command above is entered in either ./.crashrc or $HOME/.crashrc.

module commands   comments
echo.c echo
  • Provided primarily as a template for writing new extension modules.
  • This module is contained within the crash source package.
  • Author: anderson@redhat.com
sial.c
sial.mk
load
unload
edit
  • This module is a prerequisite for the loading of SIAL scripts.
  • Upon installing the sial.so object file with extend, any SIAL scripts located in the /usr/share/sial/crash or $HOME/.sial directories will be loaded automatically.
  • This module and its makefile are contained within the crash source package.
  • Author: lucchouina@yahoo.com
dminfo.c dminfo
  • Device Mapper information.
  • This module is contained within the crash source package.
  • Author: NEC Japan
spu.c spuctx
spus
spurq
  • Commands for viewing Cell/B.E. SPU's data
  • Requires kernel version >= 2.6.23-rc1
  • Prior to installing it, it is necessary to load the debuginfo symbols of the spufs kernel module:
      crash> mod -s spufs
  • This module is part of IBM Software Development Kit (SDK) for Multicore Acceleration since Version 3.0.
  • Author: luciojhc@br.ibm.com
pykdump epython
crashinfo
xportshow
  • Execute Python scripts in crash environment
  • Gather basic data
  • View networking information
  • See Project page for more details
  • Author: Alex Sidorenko asid@hp.com
 
crash SIAL scripts
SIAL scripts require no compilation, but they do require that the sial.so extension module be pre-loaded with extend, because sial.so provides the load command required to load SIAL scripts. To add the module to a running crash session, enter:

  crash> extend <path-to>/sial.so

The module can be installed automatically if the extend command above is entered in either ./.crashrc or $HOME/.crashrc.

SIAL scripts may be located anywhere. However, upon loading the sial.so module, SIAL scripts located in the /usr/share/sial/crash or $HOME/.sial directories will be loaded automatically. The command(s) contained in a loaded SIAL script will appear in the crash help menu.

The libsial README and README.sial files contain information regarding the format of SIAL scripts.

script commands   comments
ps.c sps
  • Alternative to native "ps" command.
  • Verified only on 2.6.14 kernel; useful as a command template.
  • Author: lucchouina@yahoo.com
files.c sfiles
  • Emulation of the native "files" command.
  • Verified only on 2.6.14 kernel; useful as a command template.
  • Author: lucchouina@yahoo.com
crash Python scripts
Pykdump scripts require no Python installed, but they do require the mpykdump.so extension module pre-loaded with extend. mpykdump.so provides built-in Python intepreter and needed pure Python libraries as well as Python bindings to crash. Loading the extension registers 'epython' command which can be used to execute Python programs.

To minimize the extension size, only parts of Python standard library are included in the extension file. If you need anything extra (e.g. XML/RPC) please contact the author.

The mpykdump.so extension file is a shared library with ZIP-archive appended at the end of it. You can use standard ZIP command to view the contents of it and add your own Python programs. In addition to generic epython command, two useful programs are included in the extension (see Wiki documentation on SF site for more details):

crashinfo
  • Print a brief summary of the dump running some tests
  • Using additional options, do other things (Swiss Army Knife approach - instead of many separate programs, use one with many options)
  • Author: asid@hp.com
xportshow
  • Print networking connections, routing tables etc. - similar to netstat
  • Author: asid@hp.com