Please wait while we load your page...

PasswordSentry

Latest Version [8.00202205221] Last Updated [May-22-2022]

Tools

PHP Manual [sys_getloadavg]

Protect Your Website Today


PHP Manual || Misc. Functions

(PHP 5 >= 5.1.3, PHP 7)

sys_getloadavgGets system load average

Description

sys_getloadavg ( void ) : array

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.

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] > 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.



PHP Manual || Misc. Functions