From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23287 invoked by alias); 23 May 2007 11:46:33 -0000 Received: (qmail 23261 invoked by uid 22791); 23 May 2007 11:46:25 -0000 X-Spam-Status: No, hits=4.5 required=5.0 tests=AWL,BAYES_50,DK_POLICY_SIGNSOME,UNPARSEABLE_RELAY X-Spam-Check-By: sourceware.org Received: from mail7.hitachi.co.jp (HELO mail7.hitachi.co.jp) (133.145.228.42) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 23 May 2007 11:46:17 +0000 Received: from mlsv18.hitachi.co.jp (unknown [133.144.234.166]) by mail7.hitachi.co.jp (Postfix) with ESMTP id 132FE37AC4 for ; Wed, 23 May 2007 20:46:10 +0900 (JST) Received: from mfilter-s1.hitachi.co.jp by mlsv18.hitachi.co.jp (8.13.1/8.13.1) id l4NBk98w019679; Wed, 23 May 2007 20:46:09 +0900 Received: from vshuts1.hitachi.co.jp (unverified) by mfilter-s1.hitachi.co.jp (Content Technologies SMTPRS 4.3.17) with SMTP id ; Wed, 23 May 2007 20:46:11 +0900 Received: from hsdlgw92.sdl.hitachi.co.jp ([133.144.7.20]) by vshuts1.hitachi.co.jp with SMTP id M2007052320460805891; Wed, 23 May 2007 20:46:09 +0900 Received: from vgate2.sdl.hitachi.co.jp by hsdlgw92.sdl.hitachi.co.jp (8.13.1/3.7W06092911) id l4NBk6Zb011186; Wed, 23 May 2007 20:46:08 +0900 Received: from sdl99w.sdl.hitachi.co.jp ([133.144.14.250]) by vgate2.sdl.hitachi.co.jp (SAVSMTP 3.1.1.32) with SMTP id M2007052320460820852; Wed, 23 May 2007 20:46:08 +0900 Received: from hitachi.com (IDENT:U2FsdGVkX1/MD2XXlPMZSWThmlz/hTg8CXOgL/iZIAs@localhost.localdomain [127.0.0.1]) by sdl99w.sdl.hitachi.co.jp (8.13.1/3.7W04031011) with ESMTP id l4NBjwfl001104; Wed, 23 May 2007 20:45:59 +0900 Message-ID: <46542938.3070502@hitachi.com> Date: Wed, 23 May 2007 11:46:00 -0000 From: Satoru MORIYA User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; ja-JP; rv:1.4) Gecko/20030624 Netscape/7.1 (ax) X-Accept-Language: ja MIME-Version: 1.0 To: systemtap@sources.redhat.com, crash-utility@redhat.com Cc: yumiko.sugita.yf@hitachi.com, masami.hiramatsu.pt@hitachi.com, soshima@redhat.com, haoki@redhat.com Subject: [RFC] Crash extension for SystemTap Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact systemtap-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sourceware.org X-SW-Source: 2007-q2/txt/msg00373.txt.bz2 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 (*) is the name of trace module from which you retrieve data. 4. You can get output files under the directory whose name is . 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