Can anyone recommend a php approach to help me determine if my server is maxed out? Me and a friend have created a site on a dedicated server that has seen steadily increasing traffic for almost exactly a year now and I'm starting to wonder how close it might be getting to its limit.
There is a file that includes all the critical application definitions that gets run on almost every page access. I was thinking of putting something like this in there:
// 1 in 100 chance...
if (rand(0,99) == 0) {
$str = passthru('w');
// then parse the results to determine server load
}
The problem is, I'm not sure what part of the 'w' results are more relevant or what threshold is too high.
Other things I don't know: Where is the bottleneck (if any)? Is it the disk drive? I need more RAM? faster CPU? Clustering?
Any help would be much appreciated.