iostat, vmstat and other kvm(4) users
Joerg Sonnenberger
joerg at britannica.bec.de
Tue Nov 23 15:15:27 PST 2004
On Fri, Nov 19, 2004 at 01:26:00PM -0800, Matthew Dillon wrote:
> I don't mind all normally run programs using the new API, it's just
> where someone runs 'ps' or 'dmesg' with -N/-M that we need to use the
> kvm interface. And, as such, conditional compilation is not the
> desired solution. Both features have to be compiled in, but the one
> that is used would depend on whether -N/-M is specified or not.
Can you have a look at http://leaf.dragonflybsd.org/~joerg/libkcore.diff ?
This does implement the magic to switch for pstat depending on wether
USE_KCORE is defined or not. I'm not yet satisfied with the use of
KCORE_KVM_GLOBAL, I'm thinking of using NULL instead and handle that
pointer in the library as meaning the special compatibility global.
The implementation of kcore_get_procs is a hack, this should not (yet)
be considered part of the public API.
This allows us (as in developers or more concerned admins, in theory
can certain parts be faster) to use get the fully fledged, kernel
dependent tools and the normal user can be have the fully stable version.
Joerg
>
> -Matt
> Matthew Dillon
> <dillon at xxxxxxxxxxxxx>
More information about the Kernel
mailing list