Old 19th July 2012, 07:13
mexxchan mexxchan is offline
Junior Member
Join Date: Apr 2010
Posts: 6
Thanks: 1
Thanked 1 Time in 1 Post
Default Regenerate awstats

Dear Experts,

I have a question about awstats.

By accident I have deleted the files in the /var/www/[domain_name]/web/awstats in last weekend. Hence the awstats for this domain disappeared.

It is found that the ISPConfig cron job generates the awstats data for the current month (e.g. 2012 / 07) everyday , so now there is 2012 July awstats data. But is it possible to manually trigger the system to "regenerate" the awstats for the past few months ? (e.g. 2012 January to 2012 June).

Actually I have attempted to edit the following file:

(1) changed the $month to "01" and web.log to "/$webname/log/2012/01/web.log"
(2) rerun the job:
/root/ispconfig/php/php /root/ispconfig/scripts/shell/awstats.php

It does generate the data for the 2012 January awstats files, but all the data are just zeros.

I believe I have missed out something, can anyone point me to the right direction ? Thanks in advance

Reply With Quote
Sponsored Links
Old 19th July 2012, 10:35
jnsc jnsc is offline
Join Date: Mar 2006
Location: Lausanne, Switzerland
Posts: 531
Thanks: 11
Thanked 175 Times in 79 Posts

You may look at this thread http://www.howtoforge.com/forums/sho...?t=7293&page=6 Post 53 and 55

Sometimes, the -logfile= directive does not work well, so maybe you will have to cat all the old logfiles in a temporary web.log

As you already tried to regenerate some stats, it might also be necessary to delete the history files in /var/www/webX/web/awstats/ called

Last edited by jnsc; 19th July 2012 at 10:37.
Reply With Quote
The Following User Says Thank You to jnsc For This Useful Post:
mexxchan (19th July 2012)
Old 19th July 2012, 16:25
mexxchan mexxchan is offline
Junior Member
Join Date: Apr 2010
Posts: 6
Thanks: 1
Thanked 1 Time in 1 Post

Thanks !!!

I follow the thread but failed initially . However, after some attempts I figured out that I need to add "-update" in the command in order to make it.

One further thing is that the -log parameter doesn't work too, hence I have to manually create the soft link to the right web.log and then it works. (that's pretty easy). And it is also necessary to empty all the files in the "web/awstats" folder first (I don't know why I need to do it but if I don't then there is no generation of the past statistics, strange thing.)

The commands I used (for generating the Jan / Feb/ Mar 2012) are:

yes | rm /var/www/www.[domain].com/log/web.log
ln -s /var/www/www.[domain].com/log/2012/01/web.log /var/www/www.[domain].com/log/web.log
perl /home/admispconfig/ispconfig/tools/awstats/tools/awstats_buildstaticpages.pl -year=2012 -month=01 -update -config=www.[domain].com -awstatsprog=/home/admispconfig/ispconfig/tools/awstats/wwwroot/cgi-bin/awstats.pl -builddate=2012-01 -dir=/var/www/web105/web/awstats

yes | rm /var/www/www.[domain].com/log/web.log
ln -s /var/www/www.[domain].com/log/2012/02/web.log /var/www/www.[domain].com/log/web.log
perl /home/admispconfig/ispconfig/tools/awstats/tools/awstats_buildstaticpages.pl -year=2012 -month=02 -update -config=www.[domain].com -awstatsprog=/home/admispconfig/ispconfig/tools/awstats/wwwroot/cgi-bin/awstats.pl -builddate=2012-02 -dir=/var/www/web105/web/awstats

yes | rm /var/www/www.[domain].com/log/web.log
ln -s /var/www/www.[domain].com/log/2012/03/web.log /var/www/www.[domain].com/log/web.log

After that, it is necessary to re-run the cronjob of the awstats (I think it build the index.html file) , and now all is ok.

Thanks again.

Last edited by mexxchan; 19th July 2012 at 16:36.
Reply With Quote


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
AWStats - Fix and Improvement (working) erosbk Developers' Forum 33 1st May 2012 13:04
Need help setting up or accessing AWStats on 3.0.2 please jwlinux Installation/Configuration 2 17th April 2010 17:38
Awstats config problem Paladinemishakal HOWTO-Related Questions 1 13th February 2009 14:38
Ispconfig + awstats on debian etch Dennis Installation/Configuration 1 19th April 2008 23:57
Suse Ispconfig and AWstats shajazzi Installation/Configuration 4 16th May 2006 00:04

All times are GMT +2. The time now is 12:34.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.