From owner-freebsd-hackers@FreeBSD.ORG Wed Mar 14 18:25:43 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0134F1065679 for ; Wed, 14 Mar 2012 18:25:43 +0000 (UTC) (envelope-from maninya@gmail.com) Received: from mail-yw0-f54.google.com (mail-yw0-f54.google.com [209.85.213.54]) by mx1.freebsd.org (Postfix) with ESMTP id B04D88FC14 for ; Wed, 14 Mar 2012 18:25:42 +0000 (UTC) Received: by yhgm50 with SMTP id m50so2587853yhg.13 for ; Wed, 14 Mar 2012 11:25:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=HMT1BWjwVSfUpzBfA9GyRbCt9F7uzFd9DirhK/762y8=; b=Me1bCvGhj/kPyIAP3C5bkOXytiNTo6qYsMsC7EKAxqZnJo1WpBIdbJnHxo8D7padSU Sdi0TSxRmjMqlKoWPaR8ItfvMzRRHCzm4yz7izoX7MEF23WTTB9BgiJARgdeuL1z/wRr o6VomD8bJY7A5uhOUQT4DzX0+tVWhZjdRyXrPT1IYoy0hvcsezxpjiq6UXkd1p9Hq3yc YfV/xueB3P9f01NIJInXpPBj/Nz3ZmmtuGQxetQOWnOlFCiFh1JEZlpx5MBEDlx1NM2z f8txs3lSd/+/CB9J4Zhe0P9UEA3RnDN/l0Wb7nwOS4jwW10BC05ll5x9CwzmsaL+Vj4V 30OQ== MIME-Version: 1.0 Received: by 10.236.144.134 with SMTP id n6mr4337781yhj.50.1331749536695; Wed, 14 Mar 2012 11:25:36 -0700 (PDT) Received: by 10.147.24.14 with HTTP; Wed, 14 Mar 2012 11:25:36 -0700 (PDT) In-Reply-To: References: Date: Wed, 14 Mar 2012 23:55:36 +0530 Message-ID: From: Maninya M To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Capture states of all processes at the same time X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2012 18:25:43 -0000 Thank you, I tried doing it the first way. I configured the kernel to include DDB, then typed on the console: sysctl debug.kdb.enter=1 to enter DDB. Then typed this to force a panic: sysctl debug.kdb.panic=1 The computer just hung after this, and after waiting for a while I pressed the reboot button. It said "no core dumps found" while rebooting. I couldn't find any core dumps in /var/crash either. So I tried again to enter DDB, typed sysctl debug.kdb.enter=1. Now the computer hangs even for this (tried it twice)! What did I do wrong? Please help me with the steps. On 14 March 2012 22:49, Artem Belevich wrote: > On Wed, Mar 14, 2012 at 9:31 AM, Maninya M wrote: > > How can I capture the states of all running processes at a particular > point > > in time? How can I retrieve this information for later use? > > Go into DDB. Do 'panic'. wait for the kernel to finish dumping core. > Once system reboots and saves kernel core, examine process state in > the core file with gdb. Obviously it's a postmortem examination which > may not be exactly what you want. > > Less destructive option would be to do 'ps' or 'show threads' in DDB, > save its output and then continue. > > --Artem > -- Maninya -- Maninya