[issue1805] sysctl needed for taking swap statistics
Matthew Dillon
dillon at apollo.backplane.com
Tue Aug 17 17:48:57 PDT 2010
::The new sysctl will be useful, but i'll need to retrieve individual swap device
::stats too. Are you (or anybody else) going to create this one?
::
::In that case, can we leave this issue open until it's created?
::
::Regards.
Ok, I took a look at FreeBSD's vm.swap_info sysctl and implemented
something similar. Ours is slightly different so I named it differently,
vm.swap_info_array. Ours takes no arguments and returns the entire
array.
I adjusted our libkvm code in the DragonFly HEAD so you can get example
usage from that (/usr/src/lib/libkvm/kvm_getswapinfo.c) if you want
to call the sysctl directly.
Or you can use the kvm_getswapinfo() call in libkvm and it will use
the new sysctl if it is available (presuming you recompile libkvm,
of course, and run a fresh kernel).
-Matt
Matthew Dillon
<dillon at backplane.com>
More information about the Bugs
mailing list