2 .\" Copyright (c) 1989, 1991, 1993
3 .\" The Regents of the University of California. All rights reserved.
5 .\" SPDX-License-Identifier: BSD-3-Clause
7 .\" @(#)getloadavg.3 8.1 (Berkeley) 6/4/93
9 .\" 2007-12-08, mtk, Converted from mdoc to man macros
11 .TH getloadavg 3 (date) "Linux man-pages (unreleased)"
13 getloadavg \- get system load averages
16 .RI ( libc ", " \-lc )
19 .B #include <stdlib.h>
21 .BI "int getloadavg(double " loadavg[] ", int " nelem );
25 Feature Test Macro Requirements for glibc (see
26 .BR feature_test_macros (7)):
33 In glibc up to and including 2.19:
39 function returns the number of processes in the system run queue
40 averaged over various periods of time.
43 samples are retrieved and assigned to successive elements of
45 The system imposes a maximum of 3 samples, representing averages
46 over the last 1, 5, and 15 minutes, respectively.
48 If the load average was unobtainable, \-1 is returned; otherwise,
49 the number of samples actually retrieved is returned.
51 For an explanation of the terms used in this section, see
59 Interface Attribute Value
62 T} Thread safety MT-Safe