PHP sysload average

Find out if your webhost is overselling their service and overloading their servers. This is the main reason for slow sites!

Code 1

Usage Example

<html>
<body>
<pre>
<?php
if (!function_exists('sys_getloadavg')) {
    function sys_getloadavg() {   
	$loadavg_file = '/proc/loadavg';
	if (file_exists($loadavg_file)) {
		return explode(chr(32),file_get_contents($loadavg_file));
	}
	return array(0,0,0);
    }
}
 
print_r(sys_getloadavg());
 
/***** OUTPUTS ******
Array
(
    [0] => 6.24
    [1] => 4.92
    [2] => 3.99
) 
*/
?>
</pre>
</body>
</html>

Server Side Code

code goes here

Client Side Code

None

Candidate Code Suggestions

Add your suggestions and links here.