Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have an apache2 server with apache2_mod_php installed.

Is there a way for me to determine from the information under /proc (or elsewhere), which apache processes are currently executing the php module, and which VirtualHost is responsible? Perhaps even how much processing power is consumed (in some metric or another)?

share|improve this question

2 Answers 2

No, there's no easy way to do this. The best you can do is fire up mod_status and watch what's going on (ExtendedStatus On will give you a list of all the URLs being serviced).

If you have a desperate, pressing need to be able to account for PHP processing time, I would look at moving PHP processing out to a FastCGI pool then enable BSD process accounting so I could track the current and historical resource usage.

share|improve this answer

Maybe OProfile can help you: http://oprofile.sourceforge.net/about/

But if you are looking for something for billing purposes I doubt it is going to be the right tool for the job.

Cheers

share|improve this answer

Your Answer

 
discard

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.