From owner-freebsd-hackers@FreeBSD.ORG Tue Nov 27 17:35:09 2007 Return-Path: Delivered-To: hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 36FF716A418 for ; Tue, 27 Nov 2007 17:35:09 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.freebsd.org (Postfix) with ESMTP id 140D113C45B for ; Tue, 27 Nov 2007 17:35:08 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [209.31.154.41]) by cyrus.watson.org (Postfix) with ESMTP id 7C53746DDD for ; Tue, 27 Nov 2007 12:22:39 -0500 (EST) Date: Tue, 27 Nov 2007 17:18:47 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: hackers@FreeBSD.org Message-ID: <20071127171228.N94692@fledge.watson.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Subject: Updated procstat(1) 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: Tue, 27 Nov 2007 17:35:09 -0000 Dear all, I've updated the procstat(1) kernel patch and userland tool; the updated version can be found at: http://www.watson.org/~robert/freebsd/20071127-procstat.tgz The new version includes a number of changes from the old version, including: - A number of bug fixes and cleanliness improvements in the layout of output, etc, including fixes for bugs reported by Skip Ford. - "-a" now means "all processes", and the old -a has become -c, and the old -c has become -s. I.e., "All", "Command line" and "Security" rather than "Args" and "Credential". - Threads and processes are now sorted by pid and then tid. If processes are specified manually by pid, they are not sorted, although their threads will be. - A new "-k" has been added, which prints the kernel thread stacks for threads in a process (although not swapped out or actively running threads). This is extremely useful for answering questions of the sort "But *why* is the process blocked in UMA". It has both a simple mode (-k_, which lists just kernel function names, and a slightly more detailed mode (-kk), which adds the offset into the function. The last of these required new kernel changes, including an MD component. I've tested the MD parts only on i386, although I have quick hacks at what they should look like on amd64, arm, powerpc, sparc64, sun4v. I don't promise these compile or work, but they might do. I think procstat(1) is getting a lot closer to commitable state for 8-CURRENT, but further feedback would be most welcome (including reports of success on non-i386 architectures, and possibly patches to fix them). For FreeBSD developers with P4 access, you can also check out //depot/user/rwatson/procstat/... Robert N M Watson Computer Laboratory University of Cambridge