·  AWStats – Parse – Multiple files

 

- Info:

  - This tutorial shows how to tell AWStats to parse requests from multiple 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     = "perl D:\Installed\Support\AWStats\tools\logresolvemerge.pl D:\Temp\AWStats\logs\*.log |"

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

  - SiteDomain  = "localhost"

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

  - DirIcons    = "/AWStats/icon" 

 

- Create Log File:

  - Create D:\Temp\AWStats\logs\Test1.log and Test2.log.

 

    Test1.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

 

    Test2.log 

    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 "perl D:\Installed\Support\AWStats\tools\logresolvemerge.pl     

    D:\Temp\AWStats\logs\Test*.log |"...

    perl D:\Installed\Support\AWStats\tools\logresolvemerge.pl 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: 6

     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