Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to find which PHP script on my server using more CPU power, how can i check?

Is there any command or script to check which php files (With its full location) consuming more cpu power?

share|improve this question

That heavily depends on the way you run PHP scripts on your server. But in most cases you may use a PHP profiler.

Profiling with XHProf

Enhanced PHP performance profiling with Xhprof

share|improve this answer

if you're using apache you can enable mod_status with extendestatus = on so you can monitor per script CPU usage, see

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.