__ goes away
[unix-history] / usr / src / lib / libc / gen / getloadavg.3
CommitLineData
ae59e04c 1.\" Copyright (c) 1989, 1991 The Regents of the University of California.
dce66218
KM
2.\" All rights reserved.
3.\"
91cff1e1 4.\" %sccs.include.redist.man%
dce66218 5.\"
c1c0d6b6 6.\" @(#)getloadavg.3 6.6 (Berkeley) %G%
dce66218 7.\"
ae59e04c
CL
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
4af682d6
KB
19function returns the number of processes in the system run queue
20averaged over various periods of time.
21Up to
ae59e04c 22.Fa nelem
dce66218 23samples are retrieved and assigned to successive elements of
ae59e04c 24.Fa loadavg Ns Bq .
dce66218
KM
25The system imposes a maximum of 3 samples, representing averages
26over the last 1, 5, and 15 minutes, respectively.
ae59e04c 27.Sh DIAGNOSTICS
dce66218
KM
28If the load average was unobtainable, \-1 is returned; otherwise,
29the number of samples actually retrieved is returned.
ae59e04c
CL
30.Sh SEE ALSO
31.Xr uptime 1 ,
4af682d6
KB
32.Xr sysctl 2 ,
33.Xr kvm_getloadavg 3
ae59e04c
CL
34.Sh HISTORY
35The
36.Fn getloadavg
3abaeace
KB
37function appeared in
38.Bx 4.3 Reno .