1GETLOADAVG(3)              Linux Programmer's Manual             GETLOADAVG(3)
2
3
4

NAME

6       getloadavg - get system load averages
7

SYNOPSIS

9       #include <stdlib.h>
10
11       int getloadavg(double loadavg[], int nelem);
12
13   Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
14
15       getloadavg():
16           Since glibc 2.19:
17               _DEFAULT_SOURCE
18           In glibc up to and including 2.19:
19               _BSD_SOURCE
20

DESCRIPTION

22       The getloadavg() function returns the number of processes in the system
23       run queue averaged over various periods of time.  Up to  nelem  samples
24       are  retrieved  and  assigned to successive elements of loadavg[].  The
25       system imposes a maximum of 3 samples, representing averages  over  the
26       last 1, 5, and 15 minutes, respectively.
27

RETURN VALUE

29       If  the  load  average was unobtainable, -1 is returned; otherwise, the
30       number of samples actually retrieved is returned.
31

VERSIONS

33       This function is available in glibc since version 2.2.
34

ATTRIBUTES

36       For  an  explanation  of  the  terms  used   in   this   section,   see
37       attributes(7).
38
39       ┌─────────────┬───────────────┬─────────┐
40Interface    Attribute     Value   
41       ├─────────────┼───────────────┼─────────┤
42getloadavg() │ Thread safety │ MT-Safe │
43       └─────────────┴───────────────┴─────────┘

CONFORMING TO

45       Not in POSIX.1.  Present on the BSDs and Solaris.
46

SEE ALSO

48       uptime(1), proc(5)
49

COLOPHON

51       This  page  is  part of release 5.02 of the Linux man-pages project.  A
52       description of the project, information about reporting bugs,  and  the
53       latest     version     of     this    page,    can    be    found    at
54       https://www.kernel.org/doc/man-pages/.
55
56
57
58Linux                             2016-03-15                     GETLOADAVG(3)
Impressum