tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Another kvm user can go away?



In article <Pine.NEB.4.64.1612301632420.13360%speedy.whooppee.com@localhost>,
Paul Goyette  <paul%whooppee.com@localhost> wrote:
>I have managed to provide access to all of the kernel history data via 
>sysctl, and I've come up with a modified version of vmstat(1) that can 
>read the data from sysctl rather than having to use kvm.
>
>Diffs for sys/sys/kernhist.h and sys/kern/kern_history.c can be found at 
>www.netbsd.org/~pgoyette/my_vmstat/kernhist.diffs  In the same directory 
>you can find a source file my_vmstat.c (and its associated Makefile).
>
>Please review and comment (preferably constructively), and let me know 
>what more needs to be done before it gets committed.

- You should use timespec instead of timeval
- u_int32_t -> uint32_t
- count/xlate_t should be size_t/uint32_t not int
- size_t is printed with %zu not %zd
- I don't like all those linear searches/scans through things; there
  must be a more efficient way to do it.
- if find_string returns 0, you keep overwriting the 0'th entry?


christos



Home | Main Index | Thread Index | Old Index