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.

My client is hosting like 500 domains. His senior sysop for some reason is unavailable. We're trying to figure out what command you type with Linux and Apache to determine which domains are taking up the most traffic.

You see, we need to block those top few domains because it's blocking traffic to all his other customers right now. It's the Digg effect, in a sense.

share|improve this question
add comment

1 Answer 1

up vote 3 down vote accepted

In short, the easiest way to do this is to take the access logs for the last couple of hours and run them through an analytics program like webalizer or awstats.

There's no "one-shot" command you can run in apache to show you what traffic is like.

You may be able to install apachetop - this can give you some real-time information on what's going on, but if your sysadmin isn't around, I'm not sure it would be a great idea to install software on the server.

Another option would be to perhaps do a packet capture on the server for say, 15 minutes or so, and open up the capture file in wireshark. From there, you'll be able to analyze the HTTP headers to see which sites are being requested most often.

share|improve this answer
    
wtop is cool too. code.google.com/p/wtop –  Warner Mar 5 '10 at 3:57
    
wtop and logrep look to be the ticket. –  ServerChecker Mar 5 '10 at 4:11
    
I use number of connection in access log as parameter. can we not calculate how much data transferred using access log. –  vnix27 May 30 '11 at 3:40
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.