Running kgdb in batch mode.

Benjamin Kaduk kaduk at MIT.EDU
Mon Nov 26 15:17:51 UTC 2012


On Mon, 26 Nov 2012, Ed Maste wrote:

> On 26 November 2012 01:21, Sushanth Rai <sushanth_rai at 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


More information about the freebsd-hackers mailing list