crash extension modules | ||
---|---|---|
|
||
module | commands | comments |
echo.c | echo |
|
snap.c
snap.mk |
snap |
|
eppic.c eppic.mk |
load unload edit sclass sdebug sname |
|
dminfo.c | dminfo |
|
trace.c | trace |
|
gcore.c crash-gcore-command-1.2.2.tar.gz |
gcore |
|
spu.c |
spuctx spus spurq |
|
pykdump |
epython crashinfo xportshow |
|
qemu-vtop.c |
qemu-vtop |
|
ipcs.c |
ipcs |
|
pstruct.c |
pstruct |
|
lscgroup.c |
lscgroup |
|
cgget.c |
cgget |
|
swap_usage.c |
pswap |
|
memutils.c |
memutils |
|
ksm.c |
ksm |
|
fp.c fp.mk |
fp |
$ cp <path-to>/fp.c <path-to>/fp.mk extensions $ make extensions |
crash EPPIC scripts | ||
EPPIC scripts require no compilation, but they do require that the eppic.so extension module be pre-loaded with extend, because eppic.so provides the load command required to load EPPIC scripts. To add the module to a running crash session, enter: crash> extend <path-to>/eppic.so The module can be installed automatically if the extend command above is entered in either ./.crashrc or $HOME/.crashrc. EPPIC scripts may be located anywhere. However, upon loading the eppic.so module, EPPIC scripts located in the /usr/share/eppic/crash or $HOME/.eppic directories will be loaded automatically. The command(s) contained in loaded EPPIC script(s) will appear in the crash help menu. The EPPIC README and README.code files contain information regarding the format of eppic scripts. The EPPIC sources contain a sample ipcs2 command, similar in nature to the built-in ipcs command. The ipcs2 script files will be located in the extensions/eppic/applications/crash/code directory, and the directory's contents should be copied to either /usr/share/eppic/crash or $HOME/.eppic. For example:
$ make extensions Having done the above, upon loading the eppic.so module, the ipcs2 EPPIC command will be automatically loaded. The EPPIC package website is here: http://code.google.com/p/eppic
Author: Luc Chouinard
|
||
crashdc: Crash Dump Data Collector | ||
The crashdc data collector is a script that can be used in conjunction with the crash utility to automatically generate a text file containing major information about a newly generated crash dump. The package website is here: http://crashdc.sourceforge.net Author: Louis Bouchard <louis.bouchard@canonical.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). The package website is here: http://pykdump.sourceforge.net Author: Alex Sidorenko <asid@hp.com>
|
||
crashinfo |
|
|
xportshow |
|
|
crash-extscript | ||
At times we need to execute a series of crash commands to arrive at a result. i.e. we execute a command, get the output, pick an element from it, use it with the next command and so on. There are cases when this may take several steps. This utility is to automate these steps.Another use can be to execute a series of predefined crash commands, parse it to get relevant info and to generate a bug report. A brief on the components in this package.
The external script is run as a server by crash utility, when you invoke the extscript command. The external script serves the crash utility by additonal commands. The script is not executed as is. We invoke the script from crash command line. In other words, we talk to the script from within the crash utility command line. A usage example.
Now at the crash prompt: crash> extend extensions/extscript.socrash> extscript -f perl -a perl -a ./perlfc.pl crash> extscript -b vmallocinfo The first command loads the extscript module and adds the command extscript to crash utility. The second command sets up the environement. This is similar to how we pass arguments to execlp. The last argument is the script path. This command has to be modified depending on the kind of script that we are running. The third command is the bypass command which actually executes the command we have encoded in the script. In this case vmallocinfo is a command that is defined in perlfc.pl. The extscript bypasses this command to the script. The output in this case will be vmallocinfo similar to /proc/vmallocinfo, displayed on crash console. Thus in simple words, we are extending crash with additional commands encoded in a script. The help command shows all the commands supported by the script and its usage. crash> extscript -b helpThe perlfc.pl script is an example of how to write quick automation scripts to use the extscript extension of crash utility. More details can be found in the README of the package The package website is here: https://github.com/vinayakmenon/crash-extscript Author: Vinayak Menon <vinayakm.list@gmail.com>
|