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

NAME

6       getloadavg - get system load averages
7

SYNOPSIS

9       #define _BSD_SOURCE         /* See feature_test_macros(7) */
10       #include <stdlib.h>
11
12       int getloadavg(double loadavg[], int nelem);
13

DESCRIPTION

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

RETURN VALUE

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

VERSIONS

26       This function is available in glibc since version 2.2.
27

CONFORMING TO

29       Not in POSIX.1-2001.  Present on the BSDs and Solaris.
30

SEE ALSO

32       uptime(1), proc(5)
33

COLOPHON

35       This page is part of release 3.53 of the Linux  man-pages  project.   A
36       description  of  the project, and information about reporting bugs, can
37       be found at http://www.kernel.org/doc/man-pages/.
38
39
40
41Linux                             2007-12-08                     GETLOADAVG(3)
Impressum