new copyright; att/bsd/shared
[unix-history] / usr / src / lib / libc / gen / getloadavg.3
CommitLineData
dce66218
KM
1.\" Copyright (c) 1989 The Regents of the University of California.
2.\" All rights reserved.
3.\"
91cff1e1 4.\" %sccs.include.redist.man%
dce66218 5.\"
91cff1e1 6.\" @(#)getloadavg.3 6.2 (Berkeley) %G%
dce66218
KM
7.\"
8.TH GETLOADAVG 3 ""
9.UC 7
10.SH NAME
11getloadavg \- get system load averages
12.SH SYNOPSIS
13.nf
14.B getloadavg(loadavg, nelem)
15.B double loadavg[nelem];
16.B int nelem;
17.fi
18.SH DESCRIPTION
19.I Getloadavg
20returns the number of processes in the system run queue
21averaged over various periods of time. Up to
22.I nelem
23samples are retrieved and assigned to successive elements of
24.I loadavg[].
25The system imposes a maximum of 3 samples, representing averages
26over the last 1, 5, and 15 minutes, respectively.
27.SH "SEE ALSO"
28uptime(1), nlist(3), kmem(4)
29.SH DIAGNOSTICS
30If the load average was unobtainable, \-1 is returned; otherwise,
31the number of samples actually retrieved is returned.
32.SH BUGS
33Programs using this utility must have read permission on
34.I /dev/kmem.
35This restriction will eventually be lifted.