Technical FAQ
PHP Manual
CSS2 Manual
HTML Manual
JS Guide
JS Reference
PhpDock Manual
Nu-Coder Manual
PhpExpress Manual
PHP Joomla
Learn PHP
Last updated: Tue, 19 Sep 2006


(no version information, might be only in CVS)

sys_getloadavg --  get average system load


array sys_getloadavg ( void )

This function returns three samples representing the average system load (the number of processes in the system run queue) over the last 1, 5 and 15 minutes, respectively.

Note: This function is not implemented on Windows platforms.

Return Values

Returns an array with three samples (last 1, 5 and 15 minutes).


Example 1. A sys_getloadavg() example

$load = sys_getloadavg();
if ($load[0] > 80) {
    header('HTTP/1.1 503 Too busy, try again later');
    die('Server too busy. Please try again later.');

Last updated: Tue, 19 Sep 2006