KVM_VMMETER(3) BSD Programmer's Manual KVM_VMMETER(3)NAME
kvm_vmmeter, kvm_vmtotal - return virtual memory statistics
SYNOPSIS
#include <sys/param.h>
#include <sys/time.h>
#include <sys/proc.h>
#include <sys/sysctl.h>
#include <vm/vm.h>
#include <kvm.h>
#include <kvm_stat.h>
int
kvm_vmmeter(kvm_t *kd, struct vmmeter *vm);
int
kvm_vmtotal(kvm_t *kd, struct vmtotal *vt);
DESCRIPTION
The kvm_vmmeter() function fills in the struct vmmeter referenced by vm.
This structure contains various event counters and page state information
about the virtual memory system of the kernel indicated by kd.
The kvm_vmtotal() function fills in the struct vmtotal referenced by vt
with system statistics of processes in various states and physical and
virtual memory usage in pages.
The struct vmmeter and struct vmtotal structures are defined in
/usr/include/sys/vmmeter.h.
RETURN VALUESkvm_vmmeter() will return 0 on success and -1 on failure. Upon failure
kvm_geterr(3) can be used to obtain a string describing the error.
SEE ALSOkvm(3), kvm_open(3), kvm_openfiles(3), kvm_close(3), kvm_read(3),
kvm_write(3), kvm_nlist(3), kvm_geterr(3)BSDI BSD/OS May 7, 1997 1