kvm_getswapinfo.3 (84306) | kvm_getswapinfo.3 (131504) |
---|---|
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 84306 2001-10-01 16:09:29Z ru $ | 7.\" $FreeBSD: head/lib/libkvm/kvm_getswapinfo.3 131504 2004-07-02 23:52:20Z ru $ |
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 --- 8 unchanged lines hidden (view full) --- 24function fills an array of 25.Vt kvm_swap 26structures with swap summary 27information for each swap device, for up to 28.Fa maxswap 29\- 1 devices. 30The number of devices, up to 31.Fa maxswap | 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 --- 8 unchanged lines hidden (view full) --- 24function fills an array of 25.Vt kvm_swap 26structures with swap summary 27information for each swap device, for up to 28.Fa maxswap 29\- 1 devices. 30The number of devices, up to 31.Fa maxswap |
32\- 1, is returned. A grand | 32\- 1, is returned. 33A grand |
33total of all swap devices (including any devices that go beyond 34.Fa maxswap | 34total of all swap devices (including any devices that go beyond 35.Fa maxswap |
35\- 1) is returned in one additional array entry. This | 36\- 1) is returned in one additional array entry. 37This |
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 | 38entry is not counted in the return value. 39Thus, if you specify a 40.Fa maxswap 41value of 1, the function will typically return the 42value 0 and the single 43.Vt kvm_swap 44structure will be filled with |
43the grand total over all swap devices. The grand total is calculated | 45the grand total over all swap devices. 46The grand total is calculated |
44from all available swap devices whether or not you made room 45for them all in the array. 46The grand 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 53.Vt kvm_swap | 47from all available swap devices whether or not you made room 48for them all in the array. 49The grand total is returned. 50.Pp 51The flags argument is currently unused and must be passed as 0. 52.Pp 53If an error occurs, -1 is returned. 54.Pp 55Each swap partition and the grand total is summarized in the 56.Vt kvm_swap |
54structure. This structure contains the following fields: | 57structure. 58This structure contains the following fields: |
55.Pp 56.Bl -item -offset indent -compact 57.It 58.Va char ksw_devname[] ; 59.It 60.Va int ksw_total ; 61.It 62.Va int ksw_used ; --- 16 unchanged lines hidden (view full) --- 79== 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 | 59.Pp 60.Bl -item -offset indent -compact 61.It 62.Va char ksw_devname[] ; 63.It 64.Va int ksw_total ; 65.It 66.Va int ksw_used ; --- 16 unchanged lines hidden (view full) --- 83== 84.Dv NULL 85to clear the cache. 86.Sh DIAGNOSTICS 87If the load average was unobtainable, \-1 is returned; otherwise, 88the number of swap devices actually retrieved is returned. 89.Pp 90If 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. | 91in the structure, it is truncated. 92The buffer is always zero terminated. |
88.Sh SEE ALSO 89.Xr kvm 3 | 93.Sh SEE ALSO 94.Xr kvm 3 |