ASP Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming Languages - MoreASP Programming

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:
  #1  
Old September 6th, 2011, 02:28 PM
dwair dwair is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2005
Posts: 53 dwair User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 14 h 14 m 50 sec
Reputation Power: 8
Designing an web access log reader

Hi

I’m thinking of designing a classic asp page that can access a web access log file (.log) and need a bit of help / direction getting started.

I have a web site that I want to get access stats for specific pages. At the moment the stats package I have supplied by my host works for the top 20 pages but wont show me at a glance the bottom 20 out of several thousand

What I want to do is to be able to search a .log file (which is already on the server) between 2 dates for a specific string (a url), count the number of results and display the results on an asp page.

Can anybody point me to a tutorial or give me an overview of how this could work?

I have a fair amount of experience in ASP, PHP, JS and SQL but I don’t really know where to start at the moment.

Thanks

Reply With Quote
  #2  
Old September 6th, 2011, 07:11 PM
Doug G Doug G is offline
Grumpier Old Moderator
Dev Shed God 19th Plane (14000 - 14499 posts)
 
Join Date: Jun 2003
Posts: 14,237 Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level) 
Time spent in forums: 1 Month 4 Weeks 14 h 50 m 19 sec
Reputation Power: 4445
asp/vbscript doesn't have fancy file handling or file reading functions. And if the log files are compressed you'll have another problem. Basically you'll need to open the log file for reading, most likely using the filesystem object, then read the file from the top looking for your matching strings and doing whatever when you get a matching hit in a log file line.

Log files tend to be very large, I doubt you'll be happy with the performance of your page. And depending on how your host is set up, you may not be able to access the log file from your asp code at all.

If you don't need real time maybe download the log files and use a different software technology to scan and extract the data you need. The only reason you'd want to use asp to process the log file is that it's your only choice.
__________________
======
Doug G
======
It is a truism of American politics that no man who can win an election deserves to. --Trevanian, from the novel Shibumi

Reply With Quote
  #3  
Old September 8th, 2011, 02:03 AM
dwair dwair is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2005
Posts: 53 dwair User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 14 h 14 m 50 sec
Reputation Power: 8
Many thanks for the reply.

I have had a play with the filesystem object and it will certainly do what I want it to do. It’s a interesting set of functions for ASP that I didn’t know existed before and its been an interesting experience setting it up. But, as you say, the performance of scanning and counting a 70meg file makes this method more or less un-workable in practice.

Reply With Quote
  #4  
Old September 8th, 2011, 07:18 PM
Doug G Doug G is offline
Grumpier Old Moderator
Dev Shed God 19th Plane (14000 - 14499 posts)
 
Join Date: Jun 2003
Posts: 14,237 Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level) 
Time spent in forums: 1 Month 4 Weeks 14 h 50 m 19 sec
Reputation Power: 4445
If it's your server and you have the ability to install COM objects, and if you have a programmer that can write com objects, you could perhaps create a component dll that does the heavy lifting work scanning the log and provide properties you can use by asp. But if you need portability with other servers custom objects can be a problem, they need to be installed on any target server along with all necessary dependencies.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreASP Programming > Designing an web access log reader

Developer Shed Advertisers and Affiliates



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 | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap