From owner-freebsd-hackers@FreeBSD.ORG Thu Nov 11 14:55:46 2010 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 C452A1065693; Thu, 11 Nov 2010 14:55:46 +0000 (UTC) (envelope-from uqs@spoerlein.net) Received: from acme.spoerlein.net (acme.spoerlein.net [IPv6:2001:470:9a47::1]) by mx1.freebsd.org (Postfix) with ESMTP id 3943F8FC18; Thu, 11 Nov 2010 14:55:46 +0000 (UTC) Received: from acme.spoerlein.net (localhost.spoerlein.net [IPv6:::1]) by acme.spoerlein.net (8.14.4/8.14.4) with ESMTP id oABEtjdb011098 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 11 Nov 2010 15:55:45 +0100 (CET) (envelope-from uqs@spoerlein.net) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=spoerlein.net; s=dkim200908; t=1289487345; bh=7kj28phus/I5vTf2/rkXdOJHPqJRoLtEflOvvellItI=; h=Date:From:To:Cc:Subject:Message-ID:Reply-To:References: MIME-Version:Content-Type:Content-Transfer-Encoding:In-Reply-To; b=Xmh/fMEchnTBmmy+6Id3yuEbCAU5ZdbqEyK9ndpHi+0h9wihJrNAQuO3niLwLVgeq aAQ75nUGW8WXmioi4H+I+Jnstp3MB0RaLwgLFLIFq1g4fqLbqW0WUCNQZva5gsP6Lj 1wa3MTi4Qo4UG6bH4gb87YwqapCiDtqtvgxKfHJw= Received: (from uqs@localhost) by acme.spoerlein.net (8.14.4/8.14.4/Submit) id oABEtjDF011097; Thu, 11 Nov 2010 15:55:45 +0100 (CET) (envelope-from uqs@spoerlein.net) Date: Thu, 11 Nov 2010 15:55:45 +0100 From: Ulrich =?utf-8?B?U3DDtnJsZWlu?= To: Robert Watson Message-ID: <20101111145544.GH85693@acme.spoerlein.net> Mail-Followup-To: Robert Watson , hackers@FreeBSD.org, stas@FreeBSD.org References: <20101110204152.GF85693@acme.spoerlein.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: stas@FreeBSD.org, hackers@FreeBSD.org Subject: Re: libkvm: consumers of kvm_getprocs for non-live kernels? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: uqs@spoerlein.net List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Nov 2010 14:55:46 -0000 On Thu, 11.11.2010 at 13:16:39 +0000, Robert Watson wrote: > On Wed, 10 Nov 2010, Ulrich Spörlein wrote: > > > I have this cleanup of libkvm sitting in my tree and it needs a little bit > > of testing, especially the function kvm_proclist, which is only called from > > kvm_deadprocs which is only called from kvm_getprocs when kd is not ALIVE. > > > > The only consumer in our tree that I can make out is *probably* kgdb, as > > ps(1), top(1), w(1), pkill(1), fstat(1), systat(1), pmcstat(8) and bsnmpd > > don't really work on coredumps > > > > But, the kgdb file gnu/usr.bin/binutils/gdb/kvm-fbsd.c, where kvm_getprocs > > is probably called on a dead kernel is not even used during build! > > > > So I guess I'm staring at dead code here, any kvm people around that can > > clue me in? > > Even if those tools aren't using kvm properly, they should be. ps(1) at least > used to work quite well on coredumps, and perhaps still does? Oh man, looks like I need some glasses soon. When did that -M flag to ps(1) suddenly appear? Sadly, testing will have to wait till next week. > Stas has ongoing work on a libprocstat, you might want to give him a ping. > I'm not sure if he plans to refactor some of those existing tools to use that > library or not, but crashdump support is a key goal of it. Thanks for the hint, stas CC'ed and reply-to set. Over and out Uli