Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 11 Nov 2010 15:55:45 +0100
From:      Ulrich =?utf-8?B?U3DDtnJsZWlu?= <uqs@spoerlein.net>
To:        Robert Watson <rwatson@FreeBSD.org>
Cc:        stas@FreeBSD.org, hackers@FreeBSD.org
Subject:   Re: libkvm: consumers of kvm_getprocs for non-live kernels?
Message-ID:  <20101111145544.GH85693@acme.spoerlein.net>
In-Reply-To: <alpine.BSF.2.00.1011111315430.30414@fledge.watson.org>
References:  <20101110204152.GF85693@acme.spoerlein.net> <alpine.BSF.2.00.1011111315430.30414@fledge.watson.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20101111145544.GH85693>