Web-server – How to analyze which virtual host account is most greedy

apache-2.2memorytroubleshootingvirtualhostweb-server

Hi there and sorry if this is too noobish.
I've tried to find the answer myself as I usually do but I failed.

What is the best practice when I need to analyze which virtual hosts are consuming the most of the system resources – especially memory?

top or ps aux seems useless as all virtual hosts related processes are running under the same – apache – user

What about log analysis – is this the way? I've got access logs separated for individual virtual hosts if this information is of any value for you.

This question is definitely related but it didn't helped my issue:
Tracking Apache by VirtualHost

If you need any more info let me know … I'll be around.
Thanks in advance.

Best Answer

Have a look at mod_status and in particular the extended status. It should be easy enough to match the PID given in the server-status page to the output of top and ps.

Related Topic