Re: Logging of sites cached

From: Daryl Lim <dlim@dont-contact.us>
Date: Tue, 27 Jan 1998 20:27:34 +0000

> Date: Mon, 26 Jan 1998 19:19:22 +0000
> To: squid-users@nlanr.net
> From: Steve Pinel <spinel@ssc.qld.edu.au>
> Subject: Logging of sites cached

> Can anyone tell me how to dynamically display sites cached on a terminal
> window? I have seen this done somewhere (but not sure where now!). I am
> new to Squid, and I am using it at a school, and would like to monitor who
> is accessing what.

I have written a crude version which does that

I have created a special user . His .profile cantains a shell script (Assuming
you use bash or sh)
---------------<snip>-----------------
#!/bin/sh
#
clear

tail -f /usr/local/squid/logs/access.log | awk '{ print " "$3" "$7" "}'

exit
---------------<snip>-------------------

This is a rather crude method which parse the access log (Just learnt how to
use that function of awk) and returns something like

        pc.domain.com http://www.microsoft.com/

Everytime they access a site the urls is displayed . scrolling up .. When you
are finish Cntrl C and it will automatically exit and logout

Probably someone else could make a better script :)

Daryl,
  
                 | email : dlim@ihug.co.nz (Use This First)
-=>Daryl Lim<=- -| email : daryl@genesis.pakuranga.school.nz
                 | WWW : http://homepages.ihug.co.nz/~dlim/
Received on Mon Jan 26 1998 - 23:32:07 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:38:32 MST