From owner-freebsd-questions@FreeBSD.ORG Fri Apr 6 20:12:53 2012 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C3A601065670 for ; Fri, 6 Apr 2012 20:12:53 +0000 (UTC) (envelope-from Devin.Teske@fisglobal.com) Received: from mx1.fisglobal.com (mx1.fisglobal.com [199.200.24.190]) by mx1.freebsd.org (Postfix) with ESMTP id 85F7D8FC08 for ; Fri, 6 Apr 2012 20:12:53 +0000 (UTC) Received: from pps.filterd (ltcfislmsgpa07 [127.0.0.1]) by ltcfislmsgpa07.fnfis.com (8.14.4/8.14.4) with SMTP id q36JahNp032317; Fri, 6 Apr 2012 15:12:52 -0500 Received: from smtp.fisglobal.com ([10.132.206.16]) by ltcfislmsgpa07.fnfis.com with ESMTP id 1426sn839b-1 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT); Fri, 06 Apr 2012 15:12:52 -0500 Received: from dtwin (10.14.152.15) by smtp.fisglobal.com (10.132.206.16) with Microsoft SMTP Server (TLS) id 14.1.323.3; Fri, 6 Apr 2012 15:12:52 -0500 From: Devin Teske To: "'gahn'" , "'freebsd general questions'" References: <1333735492.43069.YahooMailNeo@web130205.mail.mud.yahoo.com> <08b701cd1420$f4e21a60$dea64f20$@fisglobal.com> <1333742522.34885.YahooMailNeo@web130202.mail.mud.yahoo.com> In-Reply-To: <1333742522.34885.YahooMailNeo@web130202.mail.mud.yahoo.com> Date: Fri, 6 Apr 2012 13:13:05 -0700 Message-ID: <08eb01cd1431$adfc5280$09f4f780$@fisglobal.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Outlook 14.0 Thread-Index: AQFbTu7BJ/ePPQkSZQnF+VFqrVz8YwHaL5RjAeVk3vCXU8cgQA== Content-Language: en-us X-Originating-IP: [10.14.152.15] X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.6.7498, 1.0.260, 0.0.0000 definitions=2012-04-06_03:2012-04-05, 2012-04-06, 1970-01-01 signatures=0 Content-Type: text/plain; charset="iso-8859-1" Cc: Subject: RE: learning freebsd kernel X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Apr 2012 20:12:53 -0000 > -----Original Message----- > From: gahn [mailto:ipfreak@yahoo.com] > Sent: Friday, April 06, 2012 1:02 PM > To: Devin Teske; 'freebsd general questions' > Subject: Re: learning freebsd kernel >=20 > thanks devin for the great tip. yeah, now i got core dumps...:) >=20 > but where is my "gdb" under that "debug.kdb.available"? >=20 I'm not sure I understand the question. debug.kdb.available shows "ddb" for me I usually use kgdb(1) for examining kernel core files. --=20 Devin > best >=20 > /gahn >=20 >=20 >=20 > ----- Original Message ----- > From: Devin Teske > To: 'gahn' ; 'freebsd general questions' questions@freebsd.org> > Cc: > Sent: Friday, April 6, 2012 2:13 PM > Subject: RE: learning freebsd kernel >=20 >=20 >=20 > > -----Original Message----- > > From: owner-freebsd-questions@freebsd.org [mailto:owner-freebsd- > > questions@freebsd.org] On Behalf Of gahn > > Sent: Friday, April 06, 2012 11:05 AM > > To: freebsd general questions > > Subject: learning freebsd kernel > > > > hi gurus: > > > > how could i create the core dumps on freebsd kernel? i am trying to cre= ate a > > kernel core dump on 8.1 but it didn't happen: > > > > # sysctl -w debug.kdb.panic=3D1 > > > > well the system went panic, entered the mode db>. i did "reboot' but th= ere > was > > no core/kernel dumps under /var/crash. > > >=20 > Did you set the "dumpdev" directive in /etc/rc.conf? >=20 > % grep dumpdev /etc/defaults/rc.conf > dumpdev=3D"NO"=A0 =A0 =A0 =A0 =A0 =A0 # Device name to crashdump to (or N= O). > savecore_flags=3D""=A0 =A0 =A0 # Used if dumpdev is enabled above, and p= resent. >=20 > You should set the value of dumpdev to your swap device. >=20 > You can get this value by executing the following: >=20 > awk '$3~/swap/{print $1}' /etc/fstab >=20 > Should produce something like "/dev/mfid0s1b" or "da0s1b" or "ada0s1b" or > "ad0s1b" etc. depending on your RELEASE and hardware. >=20 > If the output is, for example, "/dev/mfid0s1b", you should add the follow= ing to > /etc/rc.conf: >=20 > dumpdev=3D"/dev/mfid0s1b" >=20 > -- > Devin >=20 >=20 > > the customized kernel has those information enabled: > > > > # Debugging for use in -current > > options=A0=A0=A0=A0=A0=A0=A0=A0 KDB=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0 # Enable kernel debugger support. > > options=A0=A0=A0=A0=A0=A0=A0=A0 DDB=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0 # Support DDB. > > options=A0=A0=A0=A0=A0=A0=A0=A0 GDB=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0 # Support remote GDB. > > > > user@host:~:$ sysctl -a | grep debug.kdb > > debug.kdb.stop_cpus: 1 > > debug.kdb.trap_code: 0 > > debug.kdb.trap: 0 > > debug.kdb.panic: 0 > > debug.kdb.enter: 0 > > debug.kdb.current: ddb > > debug.kdb.available: ddb > > > > > > > > by the way, where is my gdb? on one of my company's machisne, it looks = like > > this: > > > > debug.kdb.available: ddb gdb > > > > thank you all > > > > /gahn > > _______________________________________________ > > freebsd-questions@freebsd.org mailing list > > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > > To unsubscribe, send any mail to "freebsd-questions- > unsubscribe@freebsd.org" >=20 > _____________ > The information contained in this message is proprietary and/or confident= ial. If > you are not the intended recipient, please: (i) delete the message and all copies; > (ii) do not disclose, distribute or use the message in any manner; and (i= ii) notify > the sender immediately. In addition, please be aware that any message > addressed to our domain is subject to archiving and review by persons oth= er than > the intended recipient. Thank you. _____________ The information contained in this message is proprietary and/or confidentia= l. If you are not the intended recipient, please: (i) delete the message an= d all copies; (ii) do not disclose, distribute or use the message in any ma= nner; and (iii) notify the sender immediately. In addition, please be aware= that any message addressed to our domain is subject to archiving and revie= w by persons other than the intended recipient. Thank you.