Manual Reference Pages - KVM_GETSWAPINFO (3)
- return swap summary statistics for the system
kvm_getswapinfo kvm_t *kd struct kvm_swap * int maxswap int flags
function fills an array of
structures with swap summary
information for each swap device, for up to
- 1 devices.
The number of devices, up to
- 1, is returned.
total of all swap devices (including any devices that go beyond
- 1) is returned in one additional array entry.
entry is not counted in the return value.
Thus, if you specify a
value of 1, the function will typically return the
value 0 and the single
structure will be filled with
the grand total over all swap devices.
The grand total is calculated
from all available swap devices whether or not you made room
for them all in the array.
The grand total is returned.
The flags argument is currently unused and must be passed as 0.
If an error occurs, -1 is returned.
Each swap partition and the grand total is summarized in the
This structure contains the following fields:
Values are in
a copy of the swap device flags.
This function caches the nlist values for various kernel variables which
it reuses in successive calls.
You may call the function with
to clear the cache.
If the load average was unobtainable, -1 is returned; otherwise,
the number of swap devices actually retrieved is returned.
If the name of the swap device does not fit in the static char buffer
in the structure, it is truncated.
The buffer is always zero terminated.
Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.