Quarterly Reports


AWStats produces monthly reports. There is an option that allows to generate daily reports and another one that creates yearly reports, but there is no AWStats option that produces quarterly reports.

Still there is a way to obtain these quarterly reports, starting from the AWStats monthly database files. Say that you want a report for the second quarter of 2008.

Firstly, make a few file copies as indicated here:

  1. in the directory that contains your AWStats configuration file,

    • copy awstats.your_site.conf to awstats.your_site-2008Q2.conf
  2. in your DirData directory,
    • copy awstats042008.your_site.txt to awstats042008.your_site-2008Q2.txt
    • copy awstats052008.your_site.txt to awstats052008.your_site-2008Q2.txt
    • copy awstats062008.your_site.txt to awstats062008.your_site-2008Q2.txt

The third step will be different depending on your AWStats environment.

Using AWStats as a CGI for the quarterly report

 
Open awstats.your_site-2008Q2.conf in a text editor and check that you have exactly this line (edit it if necessary):

AllowFullYearView=3

In the address bar of your browser, type
http://www.your_server/path/awstats.pl?config= your_site-2008Q2
where www.your_server/path/ is the path you usually use to view your stats.

Then select – Year – in the drop down menu at the top of your AWStats report and you get the report for the quarter.

Creating static HTML files for the AWStats quarterly report

 
Open awstats.your_site-2008Q2.conf in a text editor and check that you have exactly this line (edit it if necessary):

AllowFullYearView=2

Then from the server command line interface, enter the following commands where /appropriate_path/ is a path to the directory where you save the static HTML files:

perl awstats.pl -config=your_site-2008Q2 -month=all -year=2008 -output -staticlinks > /appropriate_path/awstats.your_site-2008Q2.html

perl awstats.pl -config=your_site-2008Q2 -month=all -year=2008 -output=alldomains -staticlinks > /appropriate_path/awstats.your_site-2008Q2.alldomains.html

perl awstats.pl -config=your_site-2008Q2 -month=all -year=2008 -output=allhosts -staticlinks > /appropriate_path/awstats.your_site-2008Q2.allhosts.html

perl awstats.pl -config=your_site-2008Q2 -month=all -year=2008 -output=lasthosts -staticlinks > /appropriate_path/awstats.your_site-2008Q2.lasthosts.html

perl awstats.pl -config=your_site-2008Q2 -month=all -year=2008 -output=unknownip -staticlinks > /appropriate_path/awstats.your_site-2008Q2.unknownip.html

perl awstats.pl -config=your_site-2008Q2 -month=all -year=2008 -output=alllogins -staticlinks > /appropriate_path/awstats.your_site-2008Q2.alllogins.html

perl awstats.pl -config=your_site-2008Q2 -month=all -year=2008 -output=lastlogins -staticlinks > /appropriate_path/awstats.your_site-2008Q2.lastlogins.html

perl awstats.pl -config=your_site-2008Q2 -month=all -year=2008 -output=allrobots -staticlinks > /appropriate_path/awstats.your_site-2008Q2.allrobots.html

perl awstats.pl -config=your_site-2008Q2 -month=all -year=2008 -output=lastrobots -staticlinks > /appropriate_path/awstats.your_site-2008Q2.lastrobots.html

perl awstats.pl -config=your_site-2008Q2 -month=all -year=2008 -output=urldetail -staticlinks > /appropriate_path/awstats.your_site-2008Q2.urldetail.html

perl awstats.pl -config=your_site-2008Q2 -month=all -year=2008 -output=urlentry -staticlinks > /appropriate_path/awstats.your_site-2008Q2.urlentry.html

perl awstats.pl -config=your_site-2008Q2 -month=all -year=2008 -output=urlexit -staticlinks > /appropriate_path/awstats.your_site-2008Q2.urlexit.html

perl awstats.pl -config=your_site-2008Q2 -month=all -year=2008 -output=browserdetail -staticlinks > /appropriate_path/awstats.your_site-2008Q2.browserdetail.html

perl awstats.pl -config=your_site-2008Q2 -month=all -year=2008 -output=osdetail -staticlinks > /appropriate_path/awstats.your_site-2008Q2.osdetail.html

perl awstats.pl -config=your_site-2008Q2 -month=all -year=2008 -output=unknownbrowser -staticlinks > /appropriate_path/awstats.your_site-2008Q2.unknownbrowser.html

perl awstats.pl -config=your_site-2008Q2 -month=all -year=2008 -output=unknownos -staticlinks > /appropriate_path/awstats.your_site-2008Q2.unknownos.html

perl awstats.pl -config=your_site-2008Q2 -month=all -year=2008 -output=refererse -staticlinks > /appropriate_path/awstats.your_site-2008Q2.refererse.html

perl awstats.pl -config=your_site-2008Q2 -month=all -year=2008 -output=refererpages -staticlinks > /appropriate_path/awstats.your_site-2008Q2.refererpages.html

perl awstats.pl -config=your_site-2008Q2 -month=all -year=2008 -output=keyphrases -staticlinks > /appropriate_path/awstats.your_site-2008Q2.keyphrases.html

perl awstats.pl -config=your_site-2008Q2 -month=all -year=2008 -output=keywords -staticlinks > /appropriate_path/awstats.your_site-2008Q2.keywords.html

perl awstats.pl -config=your_site-2008Q2 -month=all -year=2008 -output=errors404 -staticlinks > /appropriate_path/awstats.your_site-2008Q2.errors404.html

This has generated all the quarterly stats reports.

When you have checked that it correctly works on your system, copy these lines in a batch file (Windows) or in a shell script (Linux), that you will keep for the next quarter update.

Adding a special title to the « quarterly report »

 
Add this line at the end of awstats.your_site-2008Q2.conf :

HTMLHeadSection="<h3>Your site statistics for Q2 2008</h3>"

Leave a Reply

You must be logged in to post a comment.