Installing AWStats at 1and1 (page 4/4)

An updated manual for the installation of advanced webserver statistics

V. Importing old data

Following this tutorial you configured AWStats to update based on a daily log file created one day ago. Thus your analysis would only include data that has been logged <48h before your first AWStats update. If you want log data before that time to be included with your analysis, you need to import it manually in an extra step. For this purpose you will use "logresolvemerge.pl", a tool that comes with AWStats (beware of false linebreaks):

$ mkdir templog
$ perl awstats/tools/logresolvemerge.pl logs/access.log.*.gz > templog/temp.log
$ perl awstats/cgi-bin/awstats.pl -config=yourself -LogFile=$HOME/templog/temp.log -update
$ rm -rf templog

Using "logresolvemerge.pl" you merge all your gzipped logfiles into one file (templog/temp.log) with the perl script automatically sorting the various logfiles by the date of their entries. After you have created the merged logfile you update AWStats from the console, overriding the "LogFile" parameter from your config file. All data is now imported and the cron job will keep AWStats up to date.

Notice, that during updates AWStats will drop any logfile event that is older than an event which has already been part of an update. In other words: logfiles need to be processed in chronological order. With "logresolvemerge.pl" used as above this should not be a problem. If you somehow messed up anyway and need to start from scratch, just delete the respective AWStats history files (awstats/cgi-bin/awstatsmmyyyy.yourself.txt) and try again.

Importing old data without using SSH involves so much more effort that it is not covered by this tutorial.

VI. Enjoy the show

Finished! With your FTP user-name and password at hand open your webbrowser, smile and enter:

http://sxxxxxxxx.onlinehome.us/awstats/cgi-bin/awstats.pl?config=yourself

Oh, and clean up!

$ rm -f awstats-6.5.tar.gz

VII. Addendum: various links

Have a look at other topics:

first page | previous page