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.

We have some heavy server load, and we're trying to see who are the top 50 incoming Apache connections in a given day. The catch is that this server has multiple IP addresses loaded up in Apache, multiple hostnames hosted on each IP (addon domains), and logs for each domain.

What's the trick that I can add into the Apache config temporarily so that, no matter what the IP or host is that we're hosting on a given server, we can track the top 50 incoming Apache connections for a given day?

Apache 2 is what we're using with FastCGI support.

(I'm sort of filling in for another sysop. My job is mostly PHP programmer. I'm winging this for now.)

EDIT: It seems there are many correct answers. So, I'm switching this to a community wiki.

share|improve this question
    
Are we just talking basic access_log summarization, or am I missing something? –  medina Aug 3 '10 at 3:58

3 Answers 3

Apache's server-status is a good option. you can view how many connections are open, the bandwidth being used, and a bunch of other neat statistics, here is a DEMO.

apache-top is also a nice idea to check.

share|improve this answer
netstat -n|grep :80|cut -c 45-|cut -f 1 -d ':'|sort|uniq -c|sort -nr|head -n 50

might need to adjust column cut based on your version of netstat

share|improve this answer

If you want more something visual, Visitors log analyzer has a "realtime mode" where it tails the access log and updates the statistics after X amount of time has passed.

And the already mentioned Apachetop is very nice, too.

share|improve this answer

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.