Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a web server set up using MAMP and running on my Mac on my college campus with all of my work and photos. I have it open for anyone to see, but at times my computer is dishing up to 30Mbt/s out. Is there a program or a command line tool to be able to see which files are getting fetched the most and to see which IP's are connected to my computer?

share|improve this question

migrated from serverfault.com Sep 7 '11 at 2:57

This question came from our site for system and network administrators.

1 Answer 1

A good starting point would be enabling the Apache logs. From the MAMP FAQ:

The Apache HTTP Server access logs are disabled by default. To enable them, do the following:

Open the Apache HTTP configuration at /Applications/MAMP/conf/apache/httpd.conf Find this line.

#CustomLog logs/access_log combined

Note that if you simply enable this directive, Apache will write the access logs to /Applications/MAMP/Library/logs/access_log , which is probably not what you want. It is better to store the access_log to /Applications/MAMP/logs/ , which is where the MySQL logs, PHP logs and Apache error logs are kept.

Change the line to say the following. This will write your access logs to the default log directory, using the 'LogFormat' named 'combined'. This 'combined' log format follows some common conventions.

CustomLog /Applications/MAMP/logs/apache_access_log combined

Restart Apache using the MAMP widgit, or by executing this command on the command line:

/Applications/MAMP/bin/apache2/bin/apachectl restart

You'll then be able to find the log file at /Applications/MAMP/logs/apache_access_log

There are probably more comprehensive tools for analyzing the logs and data, but if you want something quick and basic, this should be a good start.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.