GETLOADAVG(3)

NAME
getloadavg - system load average values

SYNOPSIS
#include <stdlib.h>
int getloadavg(double *averages, int nelem)

DESCRIPTION
Getloadavg returns the system load average values as elements of averages up to a maximum of nelem elements. The system load average is the average number of runnable processes over a certain period. Currently the averages are delivered over the last 1, 5 and 15 minutes of system usage. So currently the system maximum is 3.

RETURNS
The returned value of getloadavg is zero or more if the call was successful, or a negative value if the call was unsuccessful. If the call was successful, the number of elements entered into averages is returned.

SEE ALSO
uptime(1).