Quantcast
Channel: All Forums
Viewing all articles
Browse latest Browse all 27852

Determine approximate length of visit from IIS Logfiles using Log Parser Studio

$
0
0

Using Log Parser Studio, ver 1.01.75 released 3/12/2012.  

Users need to log in and validate against the ASP database to get into the website.  The user list is small.  I have IIS Logfiles that have collected almost all data since the site was online. There is a 3rd party app running on the website, and it produces usage "statistics" that roughly match the number of visits.  Using their tool that collects data for only the last 30 days, I was able to approximate the totals using Log Parser Studio.  

What I'd like to do is to be able to calculate the approximate length of the users visits on the website,  Each user would access the site from only one IP address, so their cs-username & IP would be synonymous.  I would like to be able to roll up totals by month and by quarter if possible.  This calculation doesn't have to be exact, but I'd like to be able to say that user X was actively on the site for approximately 37 hours last month, as opposed to only 8 1/2 hours for the previous month.

I was using a query like the one below:

/*  Manually enter a query or click the library tab */
SELECT Userid
    , [cs-username]        -- NEWLY ADDED
    , [c-ip]               -- NEWLY ADDED
    , COUNT(*) AS Hits
    , FirstHit
    , LastHit
USING HASHSEQ(STRCAT(c-ip, [cs(User-Agent)])) AS Userid
    , MIN(TO_TIMESTAMP(date, time)) AS FirstHit
    , MAX(TO_TIMESTAMP(date, time)) AS LastHit
    , EXTRACT_EXTENSION(cs-uri-stem) AS PageType
FROM ex060324.log
WHERE sc-status BETWEEN 200 AND 310
AND PageType NOT IN ('js'; 'css'; 'gif'; 'png')
GROUP BY Userid, [cs-username], [c-ip]


but it only gives me first & last hits, per log file.  I've got several hundred logfiles to go through.  I think the site has a 20 minute timeout on it.  As to "what" constitutes a "visit", each user must hit a login page on a new session (or a timed out one), so that would be the start. The "end" of the visit would be the last entry on the same day in the logfile prior to the next login. 

I haven't been able to find any LogParser Studio queries that would give me the data I'm looking for.  

Has anyone developed a query to calculate the visit duration, or to give some approximation of that total?  I've also considered importing the raw data in to SQL to see if I could figure out how to do it there.  I'd appreciate any input on how to go about accomplishing this rough estimation of usage.

Thanks!


Viewing all articles
Browse latest Browse all 27852

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>