sys_getloadavg
(PHP 5 >= 5.1.3)
sys_getloadavg — Gets system load average
Description
array sys_getloadavg
( void
)
Return Values
Returns an array with three samples (last 1, 5 and 15
minutes).
Examples
Example #1 A sys_getloadavg() example
<?php
$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.');
}
?>
Notes
Note: This function is not
implemented on Windows platforms.