I want to easily find load cause, Is there a way to display resource usage for php scripts like this.
Cpu: index.php 30% something.php 10% ... memory: index.php 50% something.php 10% ..
Server Fault is a question and answer site for system and network administrators. It only takes a minute to sign up.Sign up to join this community
New Relic is probably the simplest answer.
Xdebug is also useful for profiling code, although it won't necessarily give you performance of one script verses another unless you manually profile each and then compare the traffic each script gets.
Another PHP profiler is XHProf, I haven't used it myself but I think it allows you compare one URL to another.
Finally, you could implement your own instrumentation into your app. Most simply you could record the execution time using microtime() and log this along with the traffic each script gets.