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?

link|improve this question

feedback

2 Answers

up vote 0 down vote accepted

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

link|improve this answer
feedback

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.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.