Documentation/devtools/maemo5/sp-rich-core: Difference between revisions

From Maemo Wiki
Jump to navigationJump to search
imported>kaltsi
New page: == 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 save...
 
imported>kaltsi
Line 60: Line 60:
</pre>
</pre>


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


== Links ==
== Links ==

Revision as of 08:33, 7 October 2009

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. 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

Create a small program that's sure to crash:

- - - snip crasher.c - - -
#include <string.h>

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-N900-40-12:~# ./crasher 
Segmentation fault (core dumped)

Nokia-N900-40-12:~# cd /home/user/MyDocs/core-dumps/
Nokia-N900-40-12:/home/user/MyDocs/core-dumps# rich-core-extract crasher-7764-11-2887.rcore.lzo 

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

Nokia-N900-40-12:/home/user/MyDocs/core-dumps# ls -l crasher-7764-11-2887
-rw-r--r--    1 user     root            9 Oct  6 12:18 cmdline
-rw-r--r--    1 user     root           74 Oct  6 12:18 component_version
-rw-r--r--    1 user     root       135168 Oct  6 12:18 coredump
-rw-r--r--    1 user     root           31 Oct  6 12:18 date
-rw-r--r--    1 user     root          646 Oct  6 12:18 df
-rw-r--r--    1 user     root          217 Oct  6 12:18 fd
-rw-r--r--    1 user     root         2665 Oct  6 12:18 ifconfig
-rw-r--r--    1 user     root         1860 Oct  6 12:18 ls_proc
-rw-r--r--    1 user     root          403 Oct  6 12:18 osso-product-info
-rw-r--r--    1 user     root           34 Oct  6 12:18 osso_software_version
-rw-r--r--    1 user     root        21495 Oct  6 12:18 packagelist
-rw-r--r--    1 user     root        78002 Oct  6 12:18 proc2csv
-rw-r--r--    1 user     root         5449 Oct  6 12:18 slabinfo
-rw-r--r--    1 user     root         3723 Oct  6 12:18 smaps

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

[rich-core-dumper man page](/development/documentation/man_pages/rich-core-dumper.html)

[rich-core-extract man page](/development/documentation/man_pages/rich-core-extract.html)

See Also

crash-reporter, sp-endurance