xref: /original-bsd/lib/libc/gen/getloadavg.3 (revision 8c7fbc72)
1.\" Copyright (c) 1989, 1991 The Regents of the University of California.
2.\" All rights reserved.
3.\"
4.\" %sccs.include.redist.man%
5.\"
6.\"     @(#)getloadavg.3	6.6 (Berkeley) 05/07/93
7.\"
8.Dd
9.Dt GETLOADAVG 3
10.Os
11.Sh NAME
12.Nm getloadavg
13.Nd get system load averages
14.Sh SYNOPSIS
15.Fn getloadavg "double loadavg[]" "int nelem"
16.Sh DESCRIPTION
17The
18.Fn getloadavg
19function returns the number of processes in the system run queue
20averaged over various periods of time.
21Up to
22.Fa nelem
23samples are retrieved and assigned to successive elements of
24.Fa loadavg Ns Bq .
25The system imposes a maximum of 3 samples, representing averages
26over the last 1, 5, and 15 minutes, respectively.
27.Sh DIAGNOSTICS
28If the load average was unobtainable, \-1 is returned; otherwise,
29the number of samples actually retrieved is returned.
30.Sh SEE ALSO
31.Xr uptime 1 ,
32.Xr sysctl 2 ,
33.Xr kvm_getloadavg 3
34.Sh HISTORY
35The
36.Fn getloadavg
37function appeared in
38.Bx 4.3 Reno .
39