update : 2015.11.03
php.shukuma.com

검색:
 
 
Gets system load average

sys_getloadavg

(PHP 5 >= 5.1.3)

sys_getloadavgGets system load average

설명

array sys_getloadavg ( void )

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.

반환값

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

예제

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.');
}
?>

주의

Note: 이 함수는 윈도우 플랫폼에서는 작동하지 않습니다.