Reputation: 34006
I use CakePHP 2.2 on PHP 5.3.8 and Litespeed 5.5.
Because of server load sometimes my site becomes unreachable so I need to check average and maximum CPU utilizations. In my old hosting packet I was checking it from cPanel, but my new server has Plesk, it is shared and I don't have permission to check CPU logs.
I know that best statistics will be the server's statistics but I curious whether is there a way, library etc. to check and log server loads? Or can you suggest another way to check server load level?
Upvotes: 0
Views: 382
Reputation: 1283
Here is a quick command to get you going:
<?php echo exec('uname -a') . "<br>";
echo exec('ps aux'); ?>
This is where I would start. You might have to modify the parameters based on underlying OS returned by the uname command. Usually the hosting company will allow you to request access to the shell so you can dig around further.
Here is a full featured library called phpsysinfo that displays everything real nice. http://phpsysinfo.sourceforge.net/phpsysinfo/index.php?disp=dynamic
Upvotes: 1