Server Load
By: Daniel
Monitoring the load on your server is very important and sometimes vital. To do this very quick and easy on your linux server requires 1 line of code to get.
$load = explode(" ", exec("cat /proc/loadavg")); echo 'Server Load: '.$load[0].'% '.$load[1].'% '.$load[2].'%';
The above code will output something similar to: Server Load: 0.01% 0.02% 0.00%
**NOTE: Your server must allow you to run the exec() php command. Some hosts disable the execution of this and several other php functions.




















(5 votes, average: 4.00 out of 5)
December 19th, 2008 at 7:19 am
Hello
As a fresh http://www.wlscripting.com user i just want to say hello to everyone else who uses this board
January 17th, 2009 at 2:37 am
You guys do a wonderful job! Keep up the good work!!!t