Modify it to separate the log file into visits. Assume initially that all hits from the same IP on the same day belong to the same visit. For extra credit add a parameter that would equal the largest interval between primary page visits.
Apply to d100.log file, and compute for each visit
- Total number of hits
- number of successful (code 200 or 304) GETs
- number of requests with 404 (not found) status code
- visit start (as HHMMSS)
- visit length (in seconds)
- visit agent (assume that the user agent is the same and take it from the first request).
Write the visit information to a tab separated file d100.log.visits
For verification, also print to the screen
- the total counts of hits,
- successful GETs,
- 404 requests,
Verify the total counts obtained from the perl program using Unix tools.
What interesting observations can you make ?