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've got a network of static file serving servers. I use nginx to serve the files, and munin to monitor the network traffic. I want to know the output bandwidth of the server that goes to each IP address downloading a file to evaluate the bandwidth each Internet Service Provider in my country is downloading from my servers. The average output bandwidth of servers is about 700MB/s (9 servers, most of them have 4 1Gbits/s ports bonded). How can I do this?

share|improve this question

1 Answer 1

The first approach that comes to mind is to have your web servers simply log the requests they handle and use a log parser to generate usage statistics. The combined log format is a standard commonly supported by log parsing web analytics software.

access_log /path/to/log combined; 

If your web servers run as cluster rather than have each server maintain their own log files which you would need to merge to get aggregated results, you can use the syslog protocol to have all nodes transmit their log entries to a central logging host and generate usage statistics there.

access_log syslog:server=address combined;

The relevant settings are documented in the nginx manual.

This older question mentions some of the web analytics software, as does Wikipedia

share|improve this answer
    
Thanks for your answer. I can use $request_time to calculate the average download speed for any download request. But I need the output bandwidth of server at each moment. Something like what munin is doing for me. But with munin I dont have any control on IPs. –  Sina Aug 16 at 9:41

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.