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 am trying to find a way to monitor my apache server so I can see which domain is causing slow down on my server when they occur. I was hoping I would be able to do it with ApacheTop but I have to list our each log file separately as Plesk splits domains apache logs into individual files.

Is there a way I can do this with ApacheTop or should I be using another tool?

Thanks

share|improve this question
add comment

3 Answers

this script monitors your apache - cron it with */5 and configure it http://www.triologic.eu/apache-monitor.0.html?&L=1 triologic web-team

share|improve this answer
add comment

I was hoping someone would come up with a fancy way to tracking domains down. The method I've been using is to enable mod_fcgid and make all PHP sites run under it. This means that PHP scripts using a lot of CPU time show up in the process table & top. Also I check the mysql processlist to see sites that have databases and if they are also using a lot of CPU time.

Would be great if there was another way of tracking down CPU hog sites.

I suppose you could possibly use ApacheTop by making a custom log rule in the apache configuration file to log all sites to a single access_log. This should be possible without affecting the normal logging of the sites.

Hoping someone has a better solution though.

share|improve this answer
add comment

Quite manual best the best way I have found so far.

Attach multiple domain access logs to the same apachetop process, and get a total overview of whats happening in real time. You can specific multiple access logs using this syntax :

apachetop -f /var/www/vhosts/site1.com/statistics/logs/access_log -f /var/www/vhosts/site2.com/statistics/logs/access_log -f /var/www/vhosts/site3.com/statistics/logs/access_log -f /var/www/vhosts/site4.com/statistics/logs/access_log -f /var/www/vhosts/site5.com/statistics/logs/access_log
share|improve this answer
add comment

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.