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>peterleinchen
 
(8 intermediate revisions by 5 users not shown)
Line 1: Line 1:
{{Devtools}}
== Description ==
== Description ==


Line 32: Line 35:
</pre>
</pre>


After copying the ''crasher'' program to your device and having installed the sp-rich-core package, you can now run the program.
After copying the ''crasher'' program to your device and having installed the tool ''crash-reporter'' package (hereby fetching sp-rich-core as dependency), you can now run the program.
 
NOTE: The daemon /usr/bin/crash_reporter_daemon that is installed with crash-reporter package will create the /home/user/MyDocs/core-dumps directory and also on all MMC media, so if you are not seeing any files appear in /home/user/MyDocs/core-dumps/ then check the locations /media/mmc*/core-dumps/ as well.


<pre>
<pre>
Line 60: Line 65:
</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 ==
Line 71: Line 76:


[[Documentation/devtools/maemo5/crash-reporter|crash-reporter]], [[Documentation/devtools/maemo5/sp-endurance|sp-endurance]]
[[Documentation/devtools/maemo5/crash-reporter|crash-reporter]], [[Documentation/devtools/maemo5/sp-endurance|sp-endurance]]
[[Category:Fremantle]]

Latest revision as of 20:15, 17 October 2014

This article documents a developer tool.
A list of available devtools is available, together with installation instructions.


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 tool crash-reporter package (hereby fetching sp-rich-core as dependency), you can now run the program.

NOTE: The daemon /usr/bin/crash_reporter_daemon that is installed with crash-reporter package will create the /home/user/MyDocs/core-dumps directory and also on all MMC media, so if you are not seeing any files appear in /home/user/MyDocs/core-dumps/ then check the locations /media/mmc*/core-dumps/ as well.

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