This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: [REVISED] manual/sysinfo.texi: Document getloadavg
- To: GNU C Library <libc-alpha at sourceware dot cygnus dot com>
- Subject: Re: [REVISED] manual/sysinfo.texi: Document getloadavg
- From: Ben Collins <bcollins at debian dot org>
- Date: Sat, 23 Dec 2000 14:42:41 -0500
- References: <20001223142058.I18814@visi.net> <200012231924.eBNJOrK17895@neuralgia.linnaean.org>
On Sat, Dec 23, 2000 at 02:24:53PM -0500, Roland McGrath wrote:
> It might be nice to have at least a sentence about what load average means.
Right you are. Here's a revised patch.
--
-----------=======-=-======-=========-----------=====------------=-=------
/ Ben Collins -- ...on that fantastic voyage... -- Debian GNU/Linux \
` bcollins@debian.org -- bcollins@openldap.org -- bcollins@linux.com '
`---=========------=======-------------=-=-----=-===-======-------=--=---'
Index: sysinfo.texi
===================================================================
RCS file: /cvs/glibc/libc/manual/sysinfo.texi,v
retrieving revision 1.34
diff -u -u -r1.34 sysinfo.texi
--- sysinfo.texi 2000/06/01 18:32:53 1.34
+++ sysinfo.texi 2000/12/23 19:36:30
@@ -15,6 +15,7 @@
machine type
* Filesystem Handling:: Controlling/querying mounts
* System Parameters:: Getting and setting various system parameters
+* Load Average:: Getting the system load average
@end menu
To get information on parameters of the system that are built into the
@@ -1190,3 +1191,23 @@
@item
@code{bdflush}
@end itemize
+
+@node Load Average
+@section Getting the system load average
+
+This section describes the @code{getloadavg} function, which gets the 1, 5
+and 15 minute load averages of the system. The load average is the number of
+processes in the system run queue, averaged over various periods of time
+(1, 5 and 15 minutes in this case).
+
+The symbols used in this section are declared in the file @file{stdlib.h}.
+
+@comment stdlib.h
+@comment BSD
+@deftypefun int getloadavg (double @var{loadavg}[], int @var{nelem})
+This function gets the 1, 5 and 15 minute load averages of the system. The
+values are placed in @var{loadavg}. The function will place at most
+@var{nelem} elements into the array, @var{loadavg}. Never are there more
+than three elements returned and possibly less than @var{nelem}. The return
+value is the number of elements written to @var{loadavg}, or -1 on error.
+@end deftypefun