-1

How can Apache be configured so that it will be simple to get server resource stats (CPU, memory) per website (as defined by a separate sites-enabled entry) and / or by script (each .html or .php file in any website)? I had considered setting up individual Apache instances per site, but I do need to keep all the sites on the same IP address as that is a limitation of the web host (no more IP addresses to allocate).

The issue is that the server is quite overloaded (mostly memory). I would like to know which of the websites to move to a different server. By amount of hits, there is less than an order of magnitude between the most-hit site and the least-hit site (including static files such as images). If I could single out a single file or site to move / optimize then that would help.

This is Apache2 running on Ubuntu Server 12.04.

dotancohen
  • 2,590
  • 2
  • 25
  • 39
  • Downvoter, please explain how you think that this question could be improved. It is a legitimate question addressing a legitimate issue. – dotancohen Apr 22 '13 at 07:21

1 Answers1

0

I think you just can't do it so easy. if you wanted to do that,I think that you soul separate you apache instances (I mean different apache servers, not just different processes). the running config is shared among all process of apache, so there is no way to separate cpu stats. you could separate them and use a proxy, but it seems overkill to me.

you can however measure website hits for each virtual host, and have an approximate measure of consumed resources by site to estimate. not really sure what you need, so I'm maybe saying bullshit

Wakaru44
  • 193
  • 1
  • 10