1GETLOADAVG(3)              Library Functions Manual              GETLOADAVG(3)
2
3
4

NAME

6       getloadavg - get system load averages
7

SYNOPSIS

9       getloadavg(loadavg, nelem)
10              double loadavg[];
11              int    nelem;
12

DESCRIPTION

14       The  getloadavg  function returns the number of processes in the system
15       run queue averaged over various periods of time.  Up to  nelem  samples
16       are retrieved and assigned to successive elements of loadavg.  The sys‐
17       tem imposes a maximum of 3 samples, representing averages over the last
18       1, 5, and 15 minutes, respectively.
19

DIAGNOSTICS

21       If  the  load  average was unobtainable, -1 is returned; otherwise, the
22       number of samples actually retrieved is returned.
23

SEE ALSO

25       uptime(1), sysctl(3), sysctl(8).
26

HISTORY

28       The getloadavg function appeared in 4.3BSD-Reno.
29
30       This function replaces the 2.9BSD compatibility routine getla().
31
32
33
344th Berkeley Distribution      January 15, 1995                  GETLOADAVG(3)
Impressum