kinfo update

Joerg Sonnenberger joerg at britannica.bec.de
Fri Nov 19 10:26:44 PST 2004


Hi all,
the patch http://leaf.dragonflybsd.org/~joerg/libkinfo.diff
does introduce the following changes:
- remove cp_time and tk_nin / tk_nout fields from statinfo in devstat(4),
  they can be directly fetched via kinfo and esp. cp_time wasn't used
  by the devstat(4) code at all.
- add functions to libkinfo to get the number of CPUs, CCPU, CPU time,
  HZ, STATHZ, PROFHZ, tk_nin, tk_nout
- use libkinfo instead of libkvm for rpc.rstatd, it should work now as
  non-root, instead of not working at all
- the linprocfs codes seems to be broken with regard to time sampling,
  I haven't corrected that [assumes cp_time in ticks, not microseconds)
- comment out the symbols handled via kinfo in i386/i386/symbols.raw
- add sysctl handlers for tk_nin / tk_nout, this are 64-bit now
- remove CP_XXX and CPUSTATES definition in dkstat.h, for the kernel
  cp_time is changed to structure with 64-bit counters [to avoid
  overflows], the userland definition is in sys/kinfo.h
- add kinfo_clockinfo, this is currently identical to struct clockinfo,
  which will be removed later
- kgmon(8), systat(1), time(1), top(1) and vmstat(1) have been adjusted.
  top(1) DOES NOT display the last PID anymore, if this is not desired,
  I can alternatively add a sysctl for nextpid too, but I think this is
  not desired.
- iostat(8) doesn't use kvm(4) anymore, which means no setgid and no
  coredump support

To repeat, this does break some parts of the kernel sysctl ABI, all the
tools using them should be changed. Strange behaviour or coredumps may
be the result of mixing old and new kernel/world.

Joerg





More information about the Submit mailing list