sp-rich-core

Description

sp-rich-core is a package that installs an init script that pipes core dumps through a script. This script collects lots of information from the system and then saves that and the core dump data compressed into a file (by default onto an MMC card). The collected information includes process SMAPS data, most of /proc data, last lines from syslog, df and ifconfig output etc.

Compressing the core dumps (with lzo) actually speeds up saving them.

Use rich-core-extract (from sp-rich-core-postproc package) to extract the information from a rich core dump.

Packages

source: sp-rich-core

binary: sp-rich-core, sp-rich-core-postproc

Usage Examples

In order to get core dumps, one of these directories needs to exist: /media/mmc1/core-dumps or /media/mmc2/core-dumps.

Create a small program that's sure to crash:

- - - snip crasher.c - - -
int main()
{
   char *p = 0;
   memcpy(p, 0x00, sizeof(p));

}
- - - snap crasher.c - - -

# gcc -g -o crasher crasher.c

After copying the crasher program to your device and having installed the sp-rich-core package, you can now run the program.

Nokia-N810:~# ./crasher
Segmentation fault (core dumped)

Nokia-N810:~# cd /media/mmc1/core-dumps
Nokia-N810:~# rich-core-extract crasher-11-1452.rcore

# by default this will create a directory of the same name without the
# suffix

Nokia-N810:~# ls -l crasher-11-1452/
-rw-r--r-- 1 user root      9 2007-11-19 08:40 cmdline
-rw-r--r-- 1 user root     54 2007-11-19 08:40 component_version
-rw-r--r-- 1 user root 135168 2007-11-19 08:40 coredump
-rw-r--r-- 1 user root     32 2007-11-19 08:40 date
-rw-r--r-- 1 user root    589 2007-11-19 08:40 df
-rw-r--r-- 1 user root    217 2007-11-19 08:40 fd
-rw-r--r-- 1 user root    766 2007-11-19 08:40 ifconfig
-rw-r--r-- 1 user root   1284 2007-11-19 08:40 ls_proc
-rw-r--r-- 1 user root    410 2007-11-19 08:40 osso-product-info
-rw-r--r-- 1 user root     40 2007-11-19 08:40 osso_software_version
-rw-r--r-- 1 user root  28911 2007-11-19 08:40 proc2csv
-rw-r--r-- 1 user root  11983 2007-11-19 08:40 slabinfo
-rw-r--r-- 1 user root   2653 2007-11-19 08:40 smaps

The directory will contain lots of potentially useful information in addition to the core dump file.

Links

rich-core-dumper man page

rich-core-extract man page

See Also

sp-endurance