·  AWStats – Parse – Single file

 

- Info:

  - This tutorial shows how to tell AWStats to parse requests from single IIS access log file.

 

- Create awstats.test.conf:

  - Copy D:\Installed\Support\AWStats\wwwroot\cgi-bin\awstats.model.conf to awstats.test.conf.

 

- Edit awstats.test.conf:

  - LogFile     = "D:\Temp\AWStats\logs\Test.log"

  - LogFormat   = "%time2 %host %method %url %code %bytesd"

  - SiteDomain  = "localhost"

  - DirData     = "D:/Temp/AWStats/DB"

  - DirIcons    = "D:\Installed\Support\AWStats\wwwroot\icon"

 

- Create Log File:

  - Create D:\Temp\AWStats\logs\Test.log

 

    Test.log

    2010-01-15 12:00:00 10.10.10.10 GET /Cars/Audi.php 200 100

    2010-01-15 12:00:10 10.10.10.10 GET /Cars/Tire.png 200 500

    2010-01-15 12:00:20 10.10.10.10 GET /Cars/Door.png 200 250

    

    2010-01-15 13:00:01 10.10.10.10 GET /Cars/Seat.php 200 100

    2010-01-15 13:00:10 10.10.10.10 GET /Cars/Tire.png 200 500

    2010-01-15 13:00:20 10.10.10.10 GET /Cars/Door.png 200 250

 

- Parse log file:

  - Start MSDOS

  - cd D:\Installed\Support\AWStats\wwwroot\cgi-bin

  - perl awstats.pl -update -config=test

    Create/Update database for config "./awstats.test.conf" by AWStats version 6.95 (build 1.943)

    From data in log file "D:\Temp\AWStats\logs\Test.log"...

    Phase 1 : First bypass old records, searching new record...

    Searching new records from beginning of log file...

    Phase 2 : Now process new records (Flush history on disk after 20000 hosts)...

    Jumped lines in file: 0

    Parsed lines in file: 7

     Found 0 dropped records,

     Found 0 corrupted records,

     Found 0 old records,

     Found 6 new qualified records.

 

- View Statistics:

  - http://localhost/AWStats/cgi-bin/awstats.pl?config=test