crashinfo: print the content of ddb capture budder

Mikolaj Golub to.my.trociny at gmail.com
Mon Oct 5 05:48:11 UTC 2009


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
+

-- 
Mikolaj Golub


More information about the freebsd-hackers mailing list