1.\" Copyright (c) 1992, 1993 2.\" The Regents of the University of California. All rights reserved. 3.\" 4.\" %sccs.include.redist.man% 5.\" 6.\" @(#)kvm_getloadavg.3 8.1 (Berkeley) 06/04/93 7.\" 8.Dd 9.Dt KVM_GETLOADAVG 3 10.Os 11.Sh NAME 12.Nm kvm_getloadavg 13.Nd get error message on kvm descriptor 14.Sh SYNOPSIS 15.Fd #include <sys/resource.h> 16.Fd #include <kvm.h> 17.br 18.Ft int 19.Fn kvm_getloadavg "kvm_t *kd" "double loadavg[]" "int nelem" 20.Sh DESCRIPTION 21The 22.Fn kvm_getloadavg 23function returns the number of processes in the system run queue 24of the kernel indicated by 25.Fa kd , 26averaged over various periods of time. 27Up to 28.Fa nelem 29samples are retrieved and assigned to successive elements of 30.Fa loadavg Ns Bq . 31The system imposes a maximum of 3 samples, representing averages 32over the last 1, 5, and 15 minutes, respectively. 33.Sh DIAGNOSTICS 34If the load average was unobtainable, \-1 is returned; otherwise, 35the number of samples actually retrieved is returned. 36.Sh SEE ALSO 37.Xr uptime 1 , 38.Xr kvm 3 , 39.Xr getloadavg 3 40