Date: Fri, 6 Apr 2012 13:02:02 -0700 (PDT) From: gahn <ipfreak@yahoo.com> To: Devin Teske <devin.teske@fisglobal.com>, 'freebsd general questions' <freebsd-questions@freebsd.org> Subject: Re: learning freebsd kernel Message-ID: <1333742522.34885.YahooMailNeo@web130202.mail.mud.yahoo.com> In-Reply-To: <08b701cd1420$f4e21a60$dea64f20$@fisglobal.com> References: <1333735492.43069.YahooMailNeo@web130205.mail.mud.yahoo.com> <08b701cd1420$f4e21a60$dea64f20$@fisglobal.com>
next in thread | previous in thread | raw e-mail | index | archive | help
thanks devin for the great tip. yeah, now i got core dumps...:)=0A=0Abut wh= ere is my "gdb" under that "debug.kdb.available"?=0A=0Abest=0A=0A/gahn=0A= =0A=0A=0A----- Original Message -----=0AFrom: Devin Teske <devin.teske@fisg= lobal.com>=0ATo: 'gahn' <ipfreak@yahoo.com>; 'freebsd general questions' <f= reebsd-questions@freebsd.org>=0ACc: =0ASent: Friday, April 6, 2012 2:13 PM= =0ASubject: RE: learning freebsd kernel=0A=0A=0A=0A> -----Original Message-= ----=0A> From: owner-freebsd-questions@freebsd.org [mailto:owner-freebsd-= =0A> questions@freebsd.org] On Behalf Of gahn=0A> Sent: Friday, April 06, 2= 012 11:05 AM=0A> To: freebsd general questions=0A> Subject: learning freebs= d kernel=0A> =0A> hi gurus:=0A> =0A> how could i create the core dumps on f= reebsd kernel? i am trying to create a=0A> kernel core dump on 8.1 but it d= idn't happen:=0A> =0A> # sysctl -w debug.kdb.panic=3D1=0A> =0A> well the sy= stem went panic, entered the mode db>. i did "reboot' but there was=0A> no = core/kernel dumps under /var/crash.=0A> =0A=0ADid you set the "dumpdev" dir= ective in /etc/rc.conf?=0A=0A% grep dumpdev /etc/defaults/rc.conf=0Adumpdev= =3D"NO"=A0 =A0 =A0 =A0 =A0 =A0 # Device name to crashdump to (or NO).=0Asav= ecore_flags=3D""=A0 =A0 =A0 # Used if dumpdev is enabled above, and presen= t.=0A=0AYou should set the value of dumpdev to your swap device.=0A=0AYou c= an get this value by executing the following:=0A=0Aawk '$3~/swap/{print $1}= ' /etc/fstab=0A=0AShould produce something like "/dev/mfid0s1b" or "da0s1b"= or "ada0s1b" or=0A"ad0s1b" etc. depending on your RELEASE and hardware.=0A= =0AIf the output is, for example, "/dev/mfid0s1b", you should add the follo= wing to=0A/etc/rc.conf:=0A=0Adumpdev=3D"/dev/mfid0s1b"=0A=0A-- =0ADevin=0A= =0A=0A> the customized kernel has those information enabled:=0A> =0A> # Deb= ugging for use in -current=0A> 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 debugge= r support.=0A> 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.=0A> 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.=0A> =0A> user@host:~:$ sysctl -a | grep debug.kdb= =0A> debug.kdb.stop_cpus: 1=0A> debug.kdb.trap_code: 0=0A> debug.kdb.trap: = 0=0A> debug.kdb.panic: 0=0A> debug.kdb.enter: 0=0A> debug.kdb.current: ddb= =0A> debug.kdb.available: ddb=0A> =0A> =0A> =0A> by the way, where is my gd= b? on one of my company's machisne, it looks like=0A> this:=0A> =0A> debug.= kdb.available: ddb gdb=0A> =0A> thank you all=0A> =0A> /gahn=0A> __________= _____________________________________=0A> freebsd-questions@freebsd.org mai= ling list=0A> http://lists.freebsd.org/mailman/listinfo/freebsd-questions= =0A> To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebs= d.org"=0A=0A_____________=0AThe information contained in this message is pr= oprietary and/or confidential. If you are not the intended recipient, pleas= e: (i) delete the message and all copies; (ii) do not disclose, distribute = or use the message in any manner; and (iii) notify the sender immediately. = In addition, please be aware that any message addressed to our domain is su= bject to archiving and review by persons other than the intended recipient.= Thank you.=0A
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1333742522.34885.YahooMailNeo>