DragonFly bugs List (threaded) for 2010-08
[
Date Prev][
Date Next]
[Thread Prev][
Thread Next]
[
Date Index][
Thread Index]
Re: [issue1805] sysctl needed for taking swap statistics
::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@backplane.com>
[
Date Prev][
Date Next]
[Thread Prev][
Thread Next]
[
Date Index][
Thread Index]