Deleted Added
full compact
kvm_getswapinfo.3 (79454) kvm_getswapinfo.3 (79754)
1.\" Copyright (c) 1999, Matthew Dillon. All rights reserved.
2.\"
3.\" Redistribution and use in source and binary forms, with or without
4.\" modification, are permitted provided under the terms of the BSD
5.\" Copyright as found in /usr/src/COPYRIGHT in the FreeBSD source tree.
6.\"
1.\" Copyright (c) 1999, Matthew Dillon. All rights reserved.
2.\"
3.\" Redistribution and use in source and binary forms, with or without
4.\" modification, are permitted provided under the terms of the BSD
5.\" Copyright as found in /usr/src/COPYRIGHT in the FreeBSD source tree.
6.\"
7.\" $FreeBSD: head/lib/libkvm/kvm_getswapinfo.3 79454 2001-07-09 09:54:33Z dd $
7.\" $FreeBSD: head/lib/libkvm/kvm_getswapinfo.3 79754 2001-07-15 07:53:42Z dd $
8.\"
9.Dd January 22, 1999
10.Dt KVM_SWAPINFO 3
11.Os
12.Sh NAME
13.Nm kvm_getswapinfo
14.Nd return swap summary statistics for the system
15.Sh LIBRARY

--- 20 unchanged lines hidden (view full) ---

36entry is not counted in the return value.
37Thus, if you specify a
38.Fa maxswap
39value of 1, the function will typically return the
40value 0 and the single
41.Vt kvm_swap
42structure will be filled with
43the grand total over all swap devices. The grand total is calculated
8.\"
9.Dd January 22, 1999
10.Dt KVM_SWAPINFO 3
11.Os
12.Sh NAME
13.Nm kvm_getswapinfo
14.Nd return swap summary statistics for the system
15.Sh LIBRARY

--- 20 unchanged lines hidden (view full) ---

36entry is not counted in the return value.
37Thus, if you specify a
38.Fa maxswap
39value of 1, the function will typically return the
40value 0 and the single
41.Vt kvm_swap
42structure will be filled with
43the grand total over all swap devices. The grand total is calculated
44from all available swap devices whether or not you made room
44from all available swap devices whether or not you made room
45for them all in the array.
46the grant total is returned.
47.Pp
48The flags argument is currently unused and must be passed as 0.
49.Pp
50If an error occurs, -1 is returned.
51.Pp
52Each swap partition and the grand total is summarized in the

--- 19 unchanged lines hidden (view full) ---

72contains
73a copy of the swap device flags.
74.Sh CACHING
75This function caches the nlist values for various kernel variables which
76it reuses in successive calls.
77You may call the function with
78.Fa kd
79==
45for them all in the array.
46the grant total is returned.
47.Pp
48The flags argument is currently unused and must be passed as 0.
49.Pp
50If an error occurs, -1 is returned.
51.Pp
52Each swap partition and the grand total is summarized in the

--- 19 unchanged lines hidden (view full) ---

72contains
73a copy of the swap device flags.
74.Sh CACHING
75This function caches the nlist values for various kernel variables which
76it reuses in successive calls.
77You may call the function with
78.Fa kd
79==
80.Dv NULL
80.Dv NULL
81to clear the cache.
82.Sh DIAGNOSTICS
83If the load average was unobtainable, \-1 is returned; otherwise,
84the number of swap devices actually retrieved is returned.
85.Pp
86If the name of the swap device does not fit in the static char buffer
87in the structure, it is truncated. The buffer is always zero terminated.
88.Sh SEE ALSO
89.Xr kvm 3
81to clear the cache.
82.Sh DIAGNOSTICS
83If the load average was unobtainable, \-1 is returned; otherwise,
84the number of swap devices actually retrieved is returned.
85.Pp
86If the name of the swap device does not fit in the static char buffer
87in the structure, it is truncated. The buffer is always zero terminated.
88.Sh SEE ALSO
89.Xr kvm 3