public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* [RFC] Crash extension for SystemTap
@ 2007-05-23 11:46 Satoru MORIYA
  2007-05-23 13:22 ` [Crash-utility] " Dave Anderson
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Satoru MORIYA @ 2007-05-23 11:46 UTC (permalink / raw)
  To: systemtap, crash-utility
  Cc: yumiko.sugita.yf, masami.hiramatsu.pt, soshima, haoki

Hi,

Here is an extension(shared object) of the crash to retrieve the trace
data of systemtap scripts.

I'd like to analyze what caused the kernel panic by using the systemtap.
However, currently the systemtap's trace data can't be retrieved from a
dumped image easily. So, I developed a crash's extension which retrieves
the data recorded by systemtap from the dumped image.
Here is a brief document of this extension. This extension supports the new
utt-based buffer as well as the bulk-mode buffer of old systemtap module.

I have tested this extention on the following system.
  * FC6, i386, kernel-2.6.21, systemtap-0.5.14, crash-4.0-1.1
  * FC6, i386, kernel-2.6.20, systemtap-0.5.13/14, crash-4.0-1.1
  * RHEL5, i386, kernel-2.6.18-8.el5, systemtap-0.5.12, crash-4.0-3.14


Preparation
==============
(A) Build the shared-object(stplog.so).

1. Put Makefile and stplog.c into a directory ($DIR)
    $ cd $DIR

2. Make the symbolic link to the crash source code directory
    $ ln -s $WHERE_CRASH_PLACED crash

3. Build
    $ make

(B) Make the crash dump which includes SystemTap trace data.
    (*)If you analyze the live system memory, ignore this section.

1. Install kdump
     If you use FC6, see following URL.
     http://fedoraproject.org/wiki/FC6KdumpKexecHowTo?highlight=%28kdump%29

2. Use SystemTap
    $ stap foo.stp

3. Panic
    $ echo c > /proc/sysrq-trigger

How to use
==============
1. start crash
    $ crash vmlinux vmcore
    (*) If you analyze the live system memory, you don't need "vmcore".
         $ crash vmlinux

2. load the shared-object
    crash> extend $(WHERE_OBJ_PLACED)/stplog.so

3. retrieve the data
    crash> stplog -m <mod_name>
    (*) <mod_name> is the name of trace module from which you retrieve data.

4. You can get output files under the directory whose name is <mod_name>.

Output
==============
stplog command makes a file per channel buffer of relayfs(equivalent to per cpu).
And it also removes padding bytes.


I believe this command is very useful for system administrators
if they monitor their systems with SystemTap.

Best Regards,

---
Satoru MORIYA
Linux Technology Center
Hitachi, Ltd., Systems Development Laboratory
E-mail: satoru.moriya.br@hitachi.com

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2007-08-20 16:20 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-05-23 11:46 [RFC] Crash extension for SystemTap Satoru MORIYA
2007-05-23 13:22 ` [Crash-utility] " Dave Anderson
2007-05-23 19:01 ` Frank Eigler
2007-05-24  0:54 ` Satoru MORIYA
2007-05-24 14:44   ` [Crash-utility] " Dave Anderson
2007-06-22 13:43     ` Satoru MORIYA
2007-06-25 16:55       ` Frank Ch. Eigler
2007-07-02 19:48       ` Frank Ch. Eigler
2007-08-20 13:42         ` [Crash-utility] " Satoru MORIYA
2007-08-20 17:50           ` Frank Ch. Eigler

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).