[PATCH] Having systemtap-crash subpackage rpm
William Cohen
wcohen@redhat.com
Fri Apr 9 21:36:00 GMT 2010
I have been experimenting with the support for kdump/crash and trying to write things up. The first thing I noticed is the flag to control building crash analysis support. The current RPM build has that turned off to avoid having the main systemtap RPM have dependencies on crash. Wouldn't it be preferable to have the crash support placed in a separate sub package, so people don't have to rebuild systemtap to use with kdump/crash? The attached patch is an suggested patched to create that subpackage.
Experiences trying out kdump/crash to extract the information were not entirely successful. I was able to get a vmcore, which I was able to load in crash. However, I wasn't able to extrace the data from the systemtap module. Below are the details of the steps taken to produce the core file and extract the data from the systemtap module. Any comments on what I need to do to get this information out of the vmcore?
I set up a RHEL-5 machine to try this out on using the instructions at:
http://kbase.redhat.com/faq/docs/DOC-6039
Installed the all the systemtap rpms including the systemtap-crash rpm. Start a script using fligh recorder mode (-F):
cd /tmp #so iotime.ko module is in a known place
stap -F -m iotime /usr/share/doc/systemtap-1.2/examples/io/iotime.stp
Disconnecting from systemtap module.
To reconnect, type "staprun -A iotime"
As root crash the machine:
echo "c" > /proc/sysrq-trigger
Wait for the machine to crash and reboot. Then look in /var/crash for a dump file:
$ ls /var/crash
2010-04-09-17\:02
As root start up crash with information about the kernel:
crash /var/crash/2010-04-09-17\:02/vmcore /usr/lib/debug/lib/modules/`uname -r`/vmlinux
Once crash gives a command prompt load the systemtap supporting shared library:
extend /usr/lib64/systemtap/staplog.so
Find out about the staplog command with:
help staplog
Should be able to get information with:
staplog iotime
However, need to have debuginfo for the file according to the output:
staplog: WARNING: The debuginfo of the trace module hasn't been loaded.
You may not be able to retrieve the correct trace data.
--- generating 'iotime/global' ---
subbufs ready on relayfs:1
n_subbufs:8, read subbuf from:0(0) to:0(0) (offset:0-31808)
-Will
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: stap-rpm-crash.diff
URL: <http://sourceware.org/pipermail/systemtap/attachments/20100409/4bad857d/attachment.ksh>
More information about the Systemtap
mailing list