Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Is there any way to show the most requested URL from apache over a timeframe, e.g. the most requested URL over the past 2 hours.

Is this type of thing possible with mod_status or could I aggregate the access logs?

share|improve this question

2 Answers 2

up vote 0 down vote accepted

I've just found apachetop which seems to do the job.

share|improve this answer

Did you try awstat? It is log file analyzer tool. I am not sure if it can provide you with the stats within two hours as you requested.

You can also use a command like this to see the visited pages and its count within your log file.

$ awk {'print $7'} /var/log/apache2/access.log | sort | uniq -c

The timeframe will depend on the contents of the log file. You can combine this with other commands like head and tail.

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.