Watch Website Hits Live

Reinvigorate has one tool that I think is really cool: Snoop. It lets you watch site hits live in a separate window, see who's watching, stalk your visitors, etc. But it has a few problems:

  1. It only works with their service, and while free, you need to be on the invite list (as of today).
  2. It isn't open-source
  3. There is no Linux version.

Apache (or any other logging web server) users, you are in luck. You can watch your hits just like the Snoop fans. All you need is SSH access if the server is not local and a terminal.

Find the directory where logs are stored on your server. A standard Apache2 install stores them in /var/log/apache2/, but your web server may differ. Anyway, cd to that directory. Now, just run the following command, and watch your hits scroll by:

tail -f access.log

This will let you watch your hits until you press Ctrl+C. You can view the request headers by users, such as IP, browser, and other things. The only downside is the raw format: sometimes it can get confusing with all of the data being thrown at you, especially with every detail (images, Flash) getting logged. But hey, it is a quick and easy way to look at your visitors, and in cases with high-traffic situations, it is helpful to diagnose server problems.

I'm watching it right now. Hi readers!

Avatar for jacob Jacob Peddicord -

Jacob is a web developer, student, and programmer from Ohio. He is a staff member at the Ubuntu Forums and is most likely a fanboy of the distribution. He loves to write in code and words, play video games, and rant about topics most would have abandoned long ago. Jacob uses GNOME and is never seen running stable software, much to the demise of his laptop.

Home » Articles »

Discussion: Watch Website Hits Live

  1. livibetter (guest)

    # Posted on 06 October 2007 at 12:09 AM

    Hi, the link to Snoop need to be fixed.

  2. Sam (guest)

    # Posted on 06 October 2007 at 03:07 AM

    Hi! Can you guess which browser I used?

  3. Don McArthur (guest)

    # Posted on 06 October 2007 at 07:46 AM

    You can pipe the output from tail to awk, and thereby select which columns from the logfile you wish to view:

    tail -f /path/to/access_log | awk '{print $1 $11}'

    ...the references to '$1' and '$11' are column numbers, in this case the source ip address and the referrer. The output will return something like: "" can choose to display additional information. Experiment with the number and placement of the columns your logfile format uses according to the information found here:

Home » Articles » Watch Website Hits Live