1GETLOADAVG(3) Linux Programmer's Manual GETLOADAVG(3)
2
3
4
6 getloadavg - get system load averages
7
9 #define _BSD_SOURCE
10 #include <stdlib.h>
11
12 int getloadavg(double loadavg[], int nelem);
13
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
22 If the load average was unobtainable, -1 is returned; otherwise, the
23 number of samples actually retrieved is returned.
24
26 This function is available in glibc since version 2.2.
27
29 Not in POSIX.1-2001. Present on the BSDs and Solaris.
30
32 uptime(1), proc(5), feature_test_macros(7)
33
35 This page is part of release 3.25 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)