How to log Apache server hits?
Hello list:
I need to know is there any software that can monitor the number of hits (server load) to my Apache web server on CentOS 5? alongwith their IPs? (if possible) Or in other words, Is there any such command to check real time server-hits (or server load, whichever is correct term)? Thank you for your support |
There's webalizer.
Or create your own script really, the apache log is fairly straight forward. Usually the logs always start out with the IPAddress, you could do something like this to get the number of unique IP's that visited: cat /var/log/httpd/access_log | cut -d" " -f1 | sort -n | uniq | wc -l Or if you want total number of hits, take the uniq out: cat /var/log/httpd/access_log | cut -d" " -f1 | sort -n | wc -l Take the wc -l off at the end like this to get all the IPAddresses that have visited your site: cat /var/log/httpd/access_log | cut -d" " -f1 | sort -n | uniq Get creative or use something like webalizer like mentioned. |
how about ...
tail -f access_log how about enabling the /server-status url for your ip? |
Hi,
Thank you both trickybird and Complich8 for your support. |
All times are GMT -5. The time now is 11:30 AM. |