Date: Fri, 9 Oct 2009 11:28:11 -0400 From: John Baldwin <jhb@freebsd.org> To: freebsd-hackers@freebsd.org Cc: Robert Watson <rwatson@FreeBSD.org>, Mikolaj Golub <to.my.trociny@gmail.com> Subject: Re: crashinfo: print the content of ddb capture budder Message-ID: <200910091128.11513.jhb@freebsd.org> In-Reply-To: <81ws3a1je1.fsf@zhuzha.ua1> References: <81ws3a1je1.fsf@zhuzha.ua1>
index | next in thread | previous in thread | raw e-mail
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
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200910091128.11513.jhb>
