Subject: Re: better w(1)
To: None <>
From: Brian C. Grayson <>
List: current-users
Date: 06/25/1999 00:27:55
On Mon, Jun 21, 1999 at 05:06:27PM +1000, Darren Reed wrote:
> In some email I received from Jason Thorpe, sie wrote:
> > 
> > about using kvm_getprocs() instead, rather than groveling
> > the proclist manually?
> Ummm, I used uses sysctl() to get process information rather than
> kvm_getprocs() (which I suspect uses sysctl() or at least could).
> There are still some other things, however, hanging off kinfo_proc
> that it needs and which it doesn't get through either interface.

  A long time ago, I was planning on hacking on the whole
kinfo_proc/kvm_getprocs()/sysctl stuff so that a single call
would provide all information needed by ps and top (no more
kvm_read()s to chase kernel pointers), and it would all be done
in such a way that we would be immune to the dreaded "proc size
changed" message.  This would obsolesce my /procfs hacks to ps,
as they wouldn't be needed, and would also make top more
resilient to kernel upgrades.

  Unfortunately, Real Life has intruded in many Big Ways, and
this has been pushed so far down on my priority list that I've
forgotten some of my ideas.  If anyone would like to work on
this, let me know, and I'll share my meager ideas before I forget
all of them.