From owner-cvs-all@FreeBSD.ORG Tue Apr 25 20:45:10 2006 Return-Path: X-Original-To: cvs-all@freebsd.org Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8467716A458; Tue, 25 Apr 2006 20:45:10 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (66-23-211-162.clients.speedfactory.net [66.23.211.162]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9731F43D8A; Tue, 25 Apr 2006 20:45:07 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from localhost (john@localhost [127.0.0.1]) by server.baldwin.cx (8.13.4/8.13.4) with ESMTP id k3PKj1B9063652; Tue, 25 Apr 2006 16:45:02 -0400 (EDT) (envelope-from jhb@freebsd.org) From: John Baldwin To: src-committers@freebsd.org Date: Tue, 25 Apr 2006 16:44:52 -0400 User-Agent: KMail/1.9.1 References: <200604252034.k3PKY441052291@repoman.freebsd.org> In-Reply-To: <200604252034.k3PKY441052291@repoman.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200604251644.54524.jhb@freebsd.org> X-Virus-Scanned: ClamAV 0.87.1/1425/Tue Apr 25 08:09:41 2006 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.1 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.0 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on server.baldwin.cx Cc: cvs-src@freebsd.org, cvs-all@freebsd.org Subject: Re: cvs commit: src/sys/ddb db_ps.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Apr 2006 20:45:11 -0000 On Tuesday 25 April 2006 16:34, John Baldwin wrote: > jhb 2006-04-25 20:34:04 UTC > > FreeBSD src repository > > Modified files: > sys/ddb db_ps.c > Log: > - Overhaul the 'ps' command in ddb to be mostly readable again. :) It is > now back to using fixed-size columns for output and each line of output > should fit in 80 columns on both 32-bit and 64-bit architectures. In > general the output is close to that of the userland ps(1) with the > exception that the 'wmesg' field is mostly similar to the "state" field > in top(1) in that it will show either a wmesg, a lock name (prefixed with > an *), "CPU xx" (for a running thread), or nothing if none of those three > conditions are true. It also respects td_name when listing threads in > a multithreaded process. There is a somewhat evilly-defined PTR64 macro > I use to make account for the change in the size of the 'wchan' column > in the formatted output (wchan is now the only pointer in the ps output > and is available so it can be passed to 'show sleepq', 'show turnstile', > or 'show lock'). > - Add two new commands "show proc [process]" and "show thread [thread]" > that show details about the specified process or thread (specified > either by pid/tid or pointer), respectively. If an address it not > specified, it uses the current kdb thread. Here is some sample output from amd64. i386 would be the same except that wchan is 8 chars shorter: db> ps pid uid ppid pgrp state wmesg wchan cmd 884 1001 854 884 R+ (threaded) threads 100147 Run CPU 1 thread 1 100146 Run CPU 2 thread 2 100145 Run CPU 0 thread 3 100144 Run CPU 3 thread 0 100134 S ucond 0xffffff005ca0e810 initial thread 854 1001 853 854 Ss+ pause 0xffffff0000d97068 tcsh 853 1001 851 851 S select 0xffffffff80634b10 sshd 851 0 772 851 Ss sbwait 0xffffff00616fc7c8 sshd 850 0 1 850 Ss+ ttyin 0xffffff0000a4a010 getty ... -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org