Commit | Line | Data |
---|---|---|
dce66218 KM |
1 | .\" Copyright (c) 1989 The Regents of the University of California. |
2 | .\" All rights reserved. | |
3 | .\" | |
91cff1e1 | 4 | .\" %sccs.include.redist.man% |
dce66218 | 5 | .\" |
91cff1e1 | 6 | .\" @(#)getloadavg.3 6.2 (Berkeley) %G% |
dce66218 KM |
7 | .\" |
8 | .TH GETLOADAVG 3 "" | |
9 | .UC 7 | |
10 | .SH NAME | |
11 | getloadavg \- get system load averages | |
12 | .SH SYNOPSIS | |
13 | .nf | |
14 | .B getloadavg(loadavg, nelem) | |
15 | .B double loadavg[nelem]; | |
16 | .B int nelem; | |
17 | .fi | |
18 | .SH DESCRIPTION | |
19 | .I Getloadavg | |
20 | returns the number of processes in the system run queue | |
21 | averaged over various periods of time. Up to | |
22 | .I nelem | |
23 | samples are retrieved and assigned to successive elements of | |
24 | .I loadavg[]. | |
25 | The system imposes a maximum of 3 samples, representing averages | |
26 | over the last 1, 5, and 15 minutes, respectively. | |
27 | .SH "SEE ALSO" | |
28 | uptime(1), nlist(3), kmem(4) | |
29 | .SH DIAGNOSTICS | |
30 | If the load average was unobtainable, \-1 is returned; otherwise, | |
31 | the number of samples actually retrieved is returned. | |
32 | .SH BUGS | |
33 | Programs using this utility must have read permission on | |
34 | .I /dev/kmem. | |
35 | This restriction will eventually be lifted. |