Date: Mon, 26 Nov 2012 10:17:40 -0500 (EST) From: Benjamin Kaduk <kaduk@MIT.EDU> To: Sushanth Rai <sushanth_rai@yahoo.com> Cc: freebsd-hackers@freebsd.org Subject: Re: Running kgdb in batch mode. Message-ID: <alpine.GSO.1.10.1211261015430.2164@multics.mit.edu> In-Reply-To: <CAPyFy2B3SJfBDFR81Z=i48LAg5cR_Ljroo8inT=1LoaW7CK7=w@mail.gmail.com> References: <1353910892.62730.YahooMailClassic@web181702.mail.ne1.yahoo.com> <CAPyFy2B3SJfBDFR81Z=i48LAg5cR_Ljroo8inT=1LoaW7CK7=w@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 26 Nov 2012, Ed Maste wrote: > On 26 November 2012 01:21, Sushanth Rai <sushanth_rai@yahoo.com> wrote: >> Basically I would like to get kernel backtrace of a bunch of threads >> from the live kernel under some conditions. When the condition is seen >> I would like to run kgdb, collect kernel backtrace of specific threads >> and exit. Is there a way run kgdb in batch mode ? Or any other way to >> get the stack trace. > > Have a look at /usr/sbin/crashinfo for an example of how to do so - > basically just run kgdb $KERNEL $VMCORE < commands_file. procstat -kk [pid] will give a kernel stack trace from userspace. -Ben Kaduk
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.GSO.1.10.1211261015430.2164>