GETLOAD

Section: Misc. Reference Manual Pages (3-local)
Index Return to Main Contents
 

NAME

getload, ugetload - load average routines  

SYNOPSIS

float getload(whatave)
int whatave;

ugetloads(aves)
float aves[3];
 

DESCRIPTION

These functions allows any program to find what the current load averages are.

Getload() returns the 1, 5, or 15 minute load average. Ugetloads() puts the 1, 5, and 15 load averages into the array passed to it. Getload() is much faster than ugetloads() and can be invoked 3 times (to return all 3 load averages) in much less time than ugetloads() can be invoked once. Getload() can only return a load average between 0.0 and 25.0, which should be fine for most applications.  

FILES

/usr/local/lib/getld - The program that actually reads /dev/kmem for getload()
uptime(1) - The program that reads /dev/kmem for ugetload()  

DIAGNOSTICS

Getload() returns:
-99 if the load average is over 25.0
-2 if the program /usr/local/lib/getld could not read /dev/kmem
-1 if /usr/local/lib/getld could not read the namelist (/vmunix).
 

BUGS

The function getload() will return a load average of 12.7 if it couldn't execute the program /usr/local/lib/getld.  

AUTHOR

John Bien
UUCP: {ihnp4 | ucbvax | decvax}!trwrb!jsb  

DATE

April 1986


 

Index

NAME
SYNOPSIS
DESCRIPTION
FILES
DIAGNOSTICS
BUGS
AUTHOR
DATE

This document was created by man2html, using the manual pages.
Time: 10:41:13 GMT, December 12, 2024