Gingercat1.png Welcome to...
GingerCat Software
We make software for the Web the Macintosh and linux
(among other things!) We hope you enjoy our site

Blog | New Site
Shell script for basic web site health

It is always a good idea to have a look at ones web logs. I have a collection of a few simple grep commands etc that I like to run on them on occasion. I finally put a few of them together. I hope someone finds this useful!

Note..

This is somewhat primitive and could be improved in numerous ways. You will have to run the script as a sudo or root user.

This script only looks at your current access_log and is set up to run on a standard fedora machine.

It reports the following data from your logs

List of browser types from log
Current number of hits in access log
List of unique Ip address from access log
List of browser types from log

__Start Script


echo " "
date
echo " "
echo "List of browser types from log"
echo " "
echo " "
cat /var/log/httpd/access_log | cut -d " " -f 12-19 | sort -u
echo " "
echo " "
echo "Current number of hits in access log"
echo " "
cat /var/log/httpd/access_log | wc -l
echo " "
echo "__________________"
echo " "
echo " "
echo "List of unique Ip address from access log "
echo " "
cat /var/log/httpd/access_log | cut -d " " -f 1 | sort -u
echo " "
echo "____ End Report __________"




__End Script




© 2006 Steve Abrahall