From owner-freebsd-hackers@FreeBSD.ORG Fri Oct 9 16:08:17 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0DA0110656A8; Fri, 9 Oct 2009 16:08:17 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id D4C908FC18; Fri, 9 Oct 2009 16:08:16 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 863AB46B2C; Fri, 9 Oct 2009 12:08:16 -0400 (EDT) Received: from jhbbsd.hudson-trading.com (unknown [209.249.190.8]) by bigwig.baldwin.cx (Postfix) with ESMTPA id C9D938A026; Fri, 9 Oct 2009 12:08:15 -0400 (EDT) From: John Baldwin To: freebsd-hackers@freebsd.org Date: Fri, 9 Oct 2009 11:28:11 -0400 User-Agent: KMail/1.9.7 References: <81ws3a1je1.fsf@zhuzha.ua1> In-Reply-To: <81ws3a1je1.fsf@zhuzha.ua1> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200910091128.11513.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Fri, 09 Oct 2009 12:08:15 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.5 required=4.2 tests=BAYES_00,RDNS_NONE autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: Robert Watson , Mikolaj Golub Subject: Re: crashinfo: print the content of ddb capture budder X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Oct 2009 16:08:17 -0000 On Monday 05 October 2009 1:48:06 am Mikolaj Golub wrote: > Hi, > > It would be nice if crashinfo(8) were also trying to output the content of ddb > capture buffer. Something like in this patch: > > --- crashinfo.sh.orig 2009-10-05 08:26:26.000000000 +0300 > +++ crashinfo.sh 2009-10-05 08:43:56.000000000 +0300 > @@ -304,3 +304,18 @@ > echo "kernel config" > echo > config -x $KERNEL > + > +file=`mktemp /tmp/crashinfo.XXXXXX` > +if [ $? -eq 0 ]; then > + ddb capture -M $VMCORE -N $KERNEL print > $file 2>/dev/null > + if [ -s $file ]; then > + echo "------------------------------------------------------------------------" > + echo "ddb capture buffer" > + echo > + cat $file | > + sed -e 's/p\{10\}p*//' # XXX: this removes the unfilled part of a capture buffer > + echo > + fi > + rm -f $file > +fi > + > I'm definitely in favor of this. I assume you have tested it locally? Do you have a sample crash.X.txt file with it enabled? -- John Baldwin