From owner-freebsd-hackers@FreeBSD.ORG Wed Mar 14 17:19:17 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 383A2106566C for ; Wed, 14 Mar 2012 17:19:17 +0000 (UTC) (envelope-from artemb@gmail.com) Received: from mail-yx0-f182.google.com (mail-yx0-f182.google.com [209.85.213.182]) by mx1.freebsd.org (Postfix) with ESMTP id EA1378FC15 for ; Wed, 14 Mar 2012 17:19:16 +0000 (UTC) Received: by yenl9 with SMTP id l9so2510342yen.13 for ; Wed, 14 Mar 2012 10:19:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=FwI4IpA4lBvxvfZkqEy5GTrBrR7YmGE6J/8nBoGRvHI=; b=zo/lKgt1qILihH9YDN35OlAs58mGipU1BmAS7UH/G2l6x49BwEzLRrFwzlUUGkC0a+ zJbH+J8dkdwSK0lFrGvaKa9oC5mJLwIF+9LXy2eQEaMZm/dq7Ck7iYxXNar6AruztV/J 3qLbGzMBR0eJZFup7sMWy8GtjECQMuOHoWp1xwEZIyr9CpvSNx4qT4hchlW863QrDCDc 9eF4MaZNpXfJi5DUSfiwWhbNyFBM/bkzScdz/jwYzaxuNgLY+gV0GRhiDmb9fOB/P9LL f3MKKmxsHDlpQvhI7toMwJ6G6XzHtPNdNiCf6AYaDZCtlHj9kk36olMAbcUCx4pDdXis ENng== MIME-Version: 1.0 Received: by 10.236.78.40 with SMTP id f28mr3909050yhe.47.1331745554814; Wed, 14 Mar 2012 10:19:14 -0700 (PDT) Sender: artemb@gmail.com Received: by 10.147.181.4 with HTTP; Wed, 14 Mar 2012 10:19:14 -0700 (PDT) In-Reply-To: References: Date: Wed, 14 Mar 2012 10:19:14 -0700 X-Google-Sender-Auth: Jj_73gY-ir_wYQ84F4IcEQFR96A Message-ID: From: Artem Belevich To: Maninya M Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-hackers@freebsd.org Subject: Re: 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 17:19:17 -0000 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