downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
search for in the  

<sleeptime_nanosleep>
Last updated: Thu, 26 Jun 2008

sys_getloadavg

(PHP 5 >= 5.1.3)

sys_getloadavg — Gets system load average

Description

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.

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.



add a noteadd a note User Contributed Notes
Gets system load average
There are no user contributed notes for this page.




<sleeptime_nanosleep>
Last updated: Thu, 26 Jun 2008
show source | credits | sitemap | contact | advertising | mirror sites
Copyright © 2001-2005 The PHP Group
All rights reserved.
This unofficial mirror is operated at: http://phpbuilder.com/
Last updated: Tue Nov 1 20:20:59 2005 EST
Columns / Articles | Tips / Quickies | News | News Linking and RSS Feeds | Shared Code Library
Mail Archives | Support / Discussion Forums | Get Started! Links | Contribute! | Docs