From owner-freebsd-hackers@FreeBSD.ORG Tue Sep 30 08:44:13 2014 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E8618385 for ; Tue, 30 Sep 2014 08:44:13 +0000 (UTC) Received: from mail-ob0-x232.google.com (mail-ob0-x232.google.com [IPv6:2607:f8b0:4003:c01::232]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B89982EA for ; Tue, 30 Sep 2014 08:44:13 +0000 (UTC) Received: by mail-ob0-f178.google.com with SMTP id uy5so3600392obc.23 for ; Tue, 30 Sep 2014 01:44:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=3lP4QPGe4MFYD2frX4yzVH2LxS2eFwY+oJYM7XacmWY=; b=ecvx/AR+jwJz2H6WxJa3vgTF/MKGvKa5Y8aGoTMR2dmWmMRabHuyUNkAOijhhAuGYi 8S/QipAkEAwzZ46gtzx+xyrdFR41SqiAiizJGiDh+b9QDqLYQ7UwHvF4Me+bFC2vRfO8 bRuOlmRl5JDrZBLhmDGkCy8PvB4K1WqSwI0yyg9zj73Ezi1nIbXAKaqspYm0XNZpBsmh E/vFEU/Pd3+ZVRwWr0ffL799NnM2e4hxUmNmPOjz2vj3zveQOS/lPEGu3mc+rlz6XHUs WRvciChDXTVa+brcLlZLvJU/GGE0SyfEHvqpZF9IGUP18vbQsnnEfZ0KN2VLflqfYYVf /6dA== MIME-Version: 1.0 X-Received: by 10.60.133.228 with SMTP id pf4mr16917649oeb.38.1412066652951; Tue, 30 Sep 2014 01:44:12 -0700 (PDT) Received: by 10.76.167.65 with HTTP; Tue, 30 Sep 2014 01:44:12 -0700 (PDT) Date: Tue, 30 Sep 2014 01:44:12 -0700 Message-ID: Subject: Textdump capture not generating "ddb.txt" when scripted via ddb utility From: Shrikanth Kamath To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Sep 2014 08:44:14 -0000 I am trying to experiment with text dumps, and using the ddb utility to script the necessary capture information when a panic is triggered. The problem I am seeing is that ddb.txt is not getting generated as the ddb capture is not set on when invoked via ddb utility. I am doing the following % /sbin/ddb script kdb.enter.panic="textdump set; capture on; show pcpu; bt; ps; alltrace; capture off; reset" % sysctl debug.ddb.textdump.pending=1 debug.ddb.textdump.pending: 0 -> 1 I drop to the debugger and trigger a panic, which promptly generates the text dump but is creating only the following text files %tar -xvf textdump.tar.1 x msgbuf.txt x panic.txt x version.txt The ddb.txt is not generated. But if I drop to the debugger and do the following after doing the above scripting, db> capture on db>show allpcpu db>capture off I am able to see the ddb.txt after triggering panic. Question is why is /sbin/ddb script not effecting "capture on" when done from command line? Am I missing any steps. Here are my settings %sysctl -a | grep ddb debug.ddb.capture.data: debug.ddb.capture.bufsize: 49152 debug.ddb.capture.inprogress: 0 debug.ddb.capture.maxbufsize: 5242880 debug.ddb.capture.bufoff: 20523 debug.ddb.scripting.unscript: debug.ddb.scripting.scripts: kdb.enter.panic=textdump set; capture on; show pcpu; bt; ps; alltrace; capture off; reset debug.ddb.textdump.do_version: 1 debug.ddb.textdump.do_panic: 1 debug.ddb.textdump.do_msgbuf: 1 debug.ddb.textdump.do_ddb: 1 debug.ddb.textdump.pending: 1 debug.ddb_use_printf: 0 debug.kdb.current: ddb debug.kdb.available: ddb gdb ndb This is in a FreeBSD 10 environment. -- Shrikanth R K