...

View Full Version : server load...



itsonlybarney
04-28-2005, 06:12 AM
how can i display the server load on my webpage so that i have an idea about how intensely my website is used at different times of the day...

Velox Letum
04-28-2005, 08:06 PM
$loadavg = explode(" ", exec("cat /proc/loadavg"));
echo 'Server Load: ' . $loadavg[2] . '%';

itsonlybarney
04-29-2005, 08:33 AM
i copied your code exactly...but it didn't work...

piniyini
04-29-2005, 11:34 AM
Are you sure that the exec() function is enabled on your server? Most have it disabled

itsonlybarney
04-30-2005, 12:50 PM
is there any test that i can do to find out whether exec() is enabled on the webhost i'm using....i dont have access to the 'php.ini'....

JamieR
04-30-2005, 06:46 PM
is there any test that i can do to find out whether exec() is enabled on the webhost i'm using....i dont have access to the 'php.ini'....

Not sure, but you could always ask them ;)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum