Is there any way of establishing what vhosts are keeping Apache processes busy, in real time?
Ideally I'd like a tool like top
(or htop
) that shows me which sites are busiest, or most costly, right now.
Could a tool like this be built on mod_log_forensic, which writes a strict log of when each request starts and ends? It wouldn't give you process IDs or CPU time, only the elapsed time from start to finish, but it might help track down leaky or long-running requests.
Feed your access logs to apachetop and see if that's any good for you. At least apachetop fills in your "See the most busiest site/URL in real time" wish.
Something like
tail -f /var/log/apache2/*access_log | apachetop
should work.Of course, then there's logstalgia ... :-)
Anything that is dependent on log files has the disadvantage that log entries are only generated once a request is complete.
Apache's mod_status shows the current requests, as they're being processed.