loadavg - return system load averages

SYNOPSIS

<loadavg>


DESCRIPTION
The loadavg function returns a list of 3 double values for the system load averages, generally over the last 1, 5 and 15 minutes respectively.


DIAGNOSTICS
loadavg returns a list of 3 double values representing the system load averages. In the event of an error, -1 is returned for one or more of the values.


EXAMPLE

<loadavg>
  <IF $ret gt 3.0> Sorry; please try again later. <exit> </IF>


CAVEATS
The loadavg function was added in version 2.1.894000000 19980501. Solaris support was added in version 2.6.928300000 19990602, and Irix support in version 2.6.929000000 19990610.

On some platforms loadavg is unimplemented. On others it will not function if the process cannot read kernel memory (it may have to be in group kmem). In such cases -1 is returned to indicate failure. Running the script via the Texis Web Server (vhttpd) may help, since vhttpd is usually started as root.

The time periods for each load average number, and the definition of "load average" itself, vary by platform. On some platforms loadavg can use noticeable system time when run in a high load environment. Running the script via the Texis Web Server can reduce this load, by pre-initializing some system data.


SEE ALSO
sysinfo


Copyright © Thunderstone Software     Last updated: Apr 15 2024
Copyright © 2024 Thunderstone Software LLC. All rights reserved.