0

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.

1
  • Are we just talking basic access_log summarization, or am I missing something?
    – medina
    Aug 3, 2010 at 3:58

3 Answers 3

1

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.

1
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

0

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .