0

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)?

Brent
  • 22,219
  • 19
  • 68
  • 102

2 Answers2

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.

womble
  • 95,029
  • 29
  • 173
  • 228
0

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

HTTP500
  • 4,827
  • 4
  • 22
  • 31