SunQuest
           Linux Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsOperating SystemsLinux Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here!
  #1  
Old August 30th, 2002, 03:14 PM
robbrown robbrown is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2002
Posts: 353 robbrown User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 20 h 32 m 55 sec
Reputation Power: 7
Squid Log Generated Top 10 List

I am trying to make a homepage for a small intranet.

All of the users on this network authenticate and use the Squid Proxy.

I would like to display a "Top 10" list of the most commonly visited sites integrated into the corner of the homepage that I am designing.

I suspect that a PHP program would work very nicely, but if another language would work, I'd be just as happy. I've searched high and low for a pre-made program to generate a top 10 list, but haven't been successful.

Does anyone know where I could find a simple log analyser to do this?

Any help is greatly appreciated!

Reply With Quote
  #2  
Old August 31st, 2002, 10:42 AM
alexgreg's Avatar
alexgreg alexgreg is offline
Full Access
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: Jun 2000
Location: London, UK
Posts: 2,019 alexgreg User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 sec
Reputation Power: 11
If the Squid logfiles are in the CLF (Common Logfile Format) then there will be loads of programs to do this. I would use Perl for this tool, because it is very fast at processing large text files. Plus there is a logfile module written already, greatly simplifying the task of summarising logfiles.

One important thing to bear in mind is that you don't want to process the logfiles for each page hit as this will make things slow. Instead, write a program to run every hour or so which will output an HTML summary (in a table or something) of the "Ten most visited sites". You can then include this generated page on all your webpages using PHP without reprocessing the logfiles each time.


Hope this helps.
__________________
Alex
(http://www.alex-greg.com)

Reply With Quote
  #3  
Old August 31st, 2002, 05:24 PM
NoXcuz's Avatar
NoXcuz NoXcuz is offline
Wiking
Dev Shed Expert (3500 - 3999 posts)
 
Join Date: Sep 2000
Location: Sweden
Posts: 3,608 NoXcuz User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 h 49 m 27 sec
Reputation Power: 11
Checkout Calamaris, which is a PERL script that does exactly what alexgreg suggests -> http://freshmeat.net/projects/calamaris/

//NoXcuz
__________________
UN*X is sexy!
who | grep -i blonde | date; cd ~; unzip; touch; strip; finger; mount; gasp; yes; uptime; umount; sleep

Reply With Quote
Reply

Viewing: Dev Shed ForumsOperating SystemsLinux Help > Squid Log Generated Top 10 List


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway