Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 6 Apr 2012 11:13:21 -0700
From:      Devin Teske <devin.teske@fisglobal.com>
To:        "'gahn'" <ipfreak@yahoo.com>, "'freebsd general questions'" <freebsd-questions@freebsd.org>
Subject:   RE: learning freebsd kernel
Message-ID:  <08b701cd1420$f4e21a60$dea64f20$@fisglobal.com>
In-Reply-To: <1333735492.43069.YahooMailNeo@web130205.mail.mud.yahoo.com>
References:  <1333735492.43069.YahooMailNeo@web130205.mail.mud.yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help


> -----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
>=20
> hi gurus:
>=20
> how could i create the core dumps on freebsd kernel? i am trying to creat=
e a
> kernel core dump on 8.1 but it didn't happen:
>=20
> # sysctl -w debug.kdb.panic=3D1
>=20
> well the system went panic, entered the mode db>. i did "reboot' but ther=
e was
> no core/kernel dumps under /var/crash.
>=20

Did you set the "dumpdev" directive in /etc/rc.conf?

% grep dumpdev /etc/defaults/rc.conf
dumpdev=3D"NO"            # Device name to crashdump to (or NO).
savecore_flags=3D""       # Used if dumpdev is enabled above, and present.

You should set the value of dumpdev to your swap device.

You can get this value by executing the following:

awk '$3~/swap/{print $1}' /etc/fstab

Should produce something like "/dev/mfid0s1b" or "da0s1b" or "ada0s1b" or
"ad0s1b" etc. depending on your RELEASE and hardware.

If the output is, for example, "/dev/mfid0s1b", you should add the followin=
g to
/etc/rc.conf:

dumpdev=3D"/dev/mfid0s1b"

--=20
Devin


> the customized kernel has those information enabled:
>=20
> # 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.
>=20
> 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
>=20
>=20
>=20
> by the way, where is my gdb? on one of my company's machisne, it looks li=
ke
> this:
>=20
> debug.kdb.available: ddb gdb
>=20
> thank you all
>=20
> /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.o=
rg"

_____________
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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?08b701cd1420$f4e21a60$dea64f20$>