• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

AWstats not working after upgrade to 8.3

There is no Plesk stuff here to help except for sergius so thank you sergius.
 
Statistics are not working

Hello,

I have the same problem. After upgrading to 8.3 all statistics are very low (about 10 times lower then usual). I tried to download the file but it didn't help..

Do you have any solution ??

Regards,
Alex V.
 
Last edited by a moderator:
I guess I am an idiot. Surprisingly the statistics.exe posted here works. I needed to wait for 2 days but it started working ok.
 
You're right tomoiaga, it started working for me also after two day.

Thanks,
Alex V.
 
Last edited by a moderator:
I do not understand what I must do

HELLO

please, can you help me . I have the same problem as the others users
I update plesk with 8.3 and no stat

when you wrote ;
Please download updated module statistics.exe and copy it to folder %plesk_bin%.
Please backup old module before copying.

I am with windows 2003 and there is not a %plesk_bin% folder ..
and what I have to do with the exe file ?

thank you and regards

jean claude
 
statistics.exe is the executable that updates your statistics so that you can see them in Plesk. %plesk_bin% refers to the Where_you_have_Plesk_installed\admin\bin. (Ex: C:\Program Files\Swsoft\Plesk\admin\bin).
 
Ok Thank's very mutch

Thank you very mutch for your answer. I installed the "exe" file in the folder.
I will post about the next stat report. sorry for my english, but I confirm you that I speak perfect french :)
bests regards from jean claude
 
copy the file to: C:\Program Files\SWsoft\Plesk\admin\bin (if this is your install directory).
or just click Start->Run and enter %plesk_bin% and the above directory will open.
 
The posted version of .exe seems to do it's job,
but how to re-elaborate those days with low number of accesses ?
Thanks
 
Hey Guys,

to re-elaborate lost AWStats statistics I took the .exe posted previously by Sergius (thanks!).
Till now it's all OK.

But when I go to %plesk-bin% folder and launch :

statistics.exe --http-web-statistics --process-domains=mydomain.tld --from-date="2008/02/19" --verbose
to elaborate the lost period, the statistics.exe program elaborates only the last logfile
(today is 28/02/2008) so it elaborates only today's log.

here's the output:

C:\Program Files\SWsoft\Plesk\admin\bin>statistics --http-web-statistics --process-domains=mydomain.tld --from-date="2008/02/26 00:00:00" --verbose
Save FTP logs 2: '' HTTP logs 2: '' mail logs 2: ''
Create/Update database for config "C:\Program Files\SWsoft\Plesk\Additional\AWStats\wwwroot\cgi-bin/awstats.mydomain.tld.conf" by AWStats version 6.6 (build 1.887)
From data in log file "C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\tmp1F6E.tmp"...
Phase 1 : First bypass old records, searching new record...
Direct access after last parsed record (after line 1448)
Jumped lines in file: 1448
Found 1448 already parsed records.
Parsed lines in file: 4790
Found 0 dropped records,
Found 0 corrupted records,
Found 0 old records,
Found 4790 new qualified records.

From the output of the command I can see that the file tmp1F6E.tmp (which is finally calculated by AWStats) starts with the date of today instead of 2008/02/19 as I specified with the parameter --from-date="008/02/19 00:00:00"

The tmp file (tmp1F6E.tmp) located in
C:\Documents and Settings\Administrator\Local Settings\Temp\
starts from today too and not from 19/02/2008. (Certainly all the IIS logfiles are present in their place {unzipped} so why statistics.exe does not take them to elaborate ?)

It seems that the parameter --from-date= does not work.

Sergius, how can we recover those lost days when the parameter --from-date= does not work ?

Thanks for the patience reading this long and boring post ;)
 
rebuilding data

What I'm going to put here is the problem, and the possible fix, and what you can do to recover stats. I assume you have access to RDP or the console of the server and you have administrator rights.

First, the problem:
Each domain with awstats configured needs a config file., since 8.3 I'm not sure which one is being used, there are 2, and both seem to be used in some cases, or at least rewritten (see later).
So, both config files:
- C:\Program Files\SWsoft\Plesk\Additional\AWStats\wwwroot\cgi-bin\awstats.domain.tld.conf
- G:\inetpub\vhosts\domain.tld\statistics\webstat\AWStats\cgi-bin\awstats.domain.tld.conf

('G:\inetpub' is my chosen location for the virtual hosts webroot.)

If you open both config files for awstat, you will find a line that says the following:
Code:
LogFormat="date time s-sitename s-computername s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs-version cs(User-Agent) cs(Cookie) cs(Referer) cs-host sc-status sc-substatus sc-win32-status sc-bytes cs-bytes time-taken"
This line is incorrect, and should be:
Code:
LogFormat="%time2 %other %cluster %other %method %url %query %other %logname %host %other %ua %other %referer %virtualname %code %other %other %bytesd %other %other"

You could go and change everything in all your config files, but let me just stop you right here. I did this yesterday, and found out that this morning all configfiles in G:\inetpub\vhosts\domain.tld\statistics\webstat\AWStats\cgi-bin have been overwritten, with the wrong LogFormat string off course. Only some of the configfiles in C:\Program Files\SWsoft\Plesk\Additional\AWStats\wwwroot\cgi-bin have been overwritten, also with the wrong LogFormat string.

I have not tested the new statistics.exe program yet, but I can maybe offer a solution for rebuilding missing data for people with missing stats.

First off all, you need as much of your old logfiles as possible, so hopefully you have a log rotation setup with enough logfiles to keep (since yesterday, 90 days with us, unchangeable by clients), otherwise, fall back to backups (I had to do this yesterday) etc...

Now be carefull and read this part carefully to avoid data loss! TAKE A BACKUP NOW of the directory G:\inetpub\vhosts\domain.tld

If your statistics are partial for a specific month, you will need to delete (move) the statistics for that and all months that follow the broken month. to rebuild them, you will need to have the logfiles for the domain in question for the ENTIRE broken month untill the current day.

In my case, the problems started on Feb 27 2008, so i first checked to see if I had all logfiles going back to Feb 1 2008 (with a restore from backups, I managed to have them for the entire month February).
What if you do not have all logfiles for the entire month? Bad luck, skip that month and check the next one.

Put all the logfiles in a place that is easy accessible, and where you have an overview of all the logfiles to process, for example in C:\restoredlogs\domain.tld\
Unzip the ones that are compressed.

Where do you look for logfiles:
Code:
G:\inetpub\vhosts\domain.tld\statistics\logs\W3SVC<xxxxx>\ex<YYMMDD>.log
They may be compressed in zip format, depends on your log rotation settings in Plesk, a .zip extension is added to the filename.
<xxxxx> represents a unique number, or identiefier, from IIS. Every website has a unique number to identify itself.
<YYMMDD> is the date where YY is the year, MM is the month and DD is the day, all with leading 0.

Go to G:\inetpub\vhosts\domain.tld\statistics\webstat
You will see a bunch of files in the format awstats<MMYYYY>.domain.tld.txt
<MMYYYY> is the month and year of data, MM being the month, YYYY being the year

Now look for the file for the month in which your stats got corrupted (Feb 2008 in my case). Move, delete, rename it (your choice, you are not going to need it anymore if everything goes right).
Do the same for all stat files following that month (in my case only Mar 2008).
DO THIS ONLY FOR THE MONTHS WHERE YOU HAVE ALL LOGFILES FOR (if my problem would have started in January, I would have to skip January, and check February, as I do not have all logfiles for January anymore)

Edit the file G:\inetpub\vhosts\domain.tld\statistics\webstat\AWStats\cgi-bin\awstats.domain.tld.conf and correct the faulty LogFormat line (see above).

Now open a command prompt and do the following:
- change to the directory G:\inetpub\vhosts\domain.tld\statistics\webstat\AWStats\cgi-bin
- execute the command:
Code:
perl awstats.pl -update -config=domain.tld -logfile="C:\restoredlogs\domain.tld\ex<YYMMDD>.log"
Replace <YYMMDD> with the date of the logfile.

You can also put this in a batch file in the G:\inetpub\vhosts\domain.tld\statistics\webstat\AWStats\cgi-bin folder if you have a lot of files to process. An example of my batch file:
Code:
perl awstats.pl -update -config=domain.tld -logfile="C:\restoredlogs\domain.tld\ex080201.log"
perl awstats.pl -update -config=domain.tld -logfile="C:\restoredlogs\domain.tld\ex080202.log"
perl awstats.pl -update -config=domain.tld -logfile="C:\restoredlogs\domain.tld\ex080203.log"
perl awstats.pl -update -config=domain.tld -logfile="C:\restoredlogs\domain.tld\ex080204.log"
perl awstats.pl -update -config=domain.tld -logfile="C:\restoredlogs\domain.tld\ex080205.log"
perl awstats.pl -update -config=domain.tld -logfile="C:\restoredlogs\domain.tld\ex080206.log"
perl awstats.pl -update -config=domain.tld -logfile="C:\restoredlogs\domain.tld\ex080207.log"
perl awstats.pl -update -config=domain.tld -logfile="C:\restoredlogs\domain.tld\ex080208.log"
perl awstats.pl -update -config=domain.tld -logfile="C:\restoredlogs\domain.tld\ex080209.log"
perl awstats.pl -update -config=domain.tld -logfile="C:\restoredlogs\domain.tld\ex080200.log"
perl awstats.pl -update -config=domain.tld -logfile="C:\restoredlogs\domain.tld\ex080210.log"
perl awstats.pl -update -config=domain.tld -logfile="C:\restoredlogs\domain.tld\ex080211.log"
perl awstats.pl -update -config=domain.tld -logfile="C:\restoredlogs\domain.tld\ex080212.log"
perl awstats.pl -update -config=domain.tld -logfile="C:\restoredlogs\domain.tld\ex080213.log"
perl awstats.pl -update -config=domain.tld -logfile="C:\restoredlogs\domain.tld\ex080214.log"
perl awstats.pl -update -config=domain.tld -logfile="C:\restoredlogs\domain.tld\ex080215.log"
perl awstats.pl -update -config=domain.tld -logfile="C:\restoredlogs\domain.tld\ex080216.log"
perl awstats.pl -update -config=domain.tld -logfile="C:\restoredlogs\domain.tld\ex080217.log"
perl awstats.pl -update -config=domain.tld -logfile="C:\restoredlogs\domain.tld\ex080218.log"
perl awstats.pl -update -config=domain.tld -logfile="C:\restoredlogs\domain.tld\ex080219.log"
perl awstats.pl -update -config=domain.tld -logfile="C:\restoredlogs\domain.tld\ex080220.log"
perl awstats.pl -update -config=domain.tld -logfile="C:\restoredlogs\domain.tld\ex080221.log"
perl awstats.pl -update -config=domain.tld -logfile="C:\restoredlogs\domain.tld\ex080222.log"
perl awstats.pl -update -config=domain.tld -logfile="C:\restoredlogs\domain.tld\ex080223.log"
perl awstats.pl -update -config=domain.tld -logfile="C:\restoredlogs\domain.tld\ex080224.log"
perl awstats.pl -update -config=domain.tld -logfile="C:\restoredlogs\domain.tld\ex080225.log"
perl awstats.pl -update -config=domain.tld -logfile="C:\restoredlogs\domain.tld\ex080226.log"
perl awstats.pl -update -config=domain.tld -logfile="C:\restoredlogs\domain.tld\ex080227.log"
perl awstats.pl -update -config=domain.tld -logfile="C:\restoredlogs\domain.tld\ex080228.log"
perl awstats.pl -update -config=domain.tld -logfile="C:\restoredlogs\domain.tld\ex080229.log"
perl awstats.pl -update -config=domain.tld -logfile="C:\restoredlogs\domain.tld\ex080301.log"
perl awstats.pl -update -config=domain.tld -logfile="C:\restoredlogs\domain.tld\ex080302.log"
perl awstats.pl -update -config=domain.tld -logfile="C:\restoredlogs\domain.tld\ex080303.log"
perl awstats.pl -update -config=domain.tld -logfile="C:\restoredlogs\domain.tld\ex080304.log"
perl awstats.pl -update -config=domain.tld -logfile="C:\restoredlogs\domain.tld\ex080305.log"
Run this batchfile and all your statistics should be correct.
check this by going to the url http://www.domain.tld/plesk-stat/webstat/AWStats/cgi-bin/awstats.pl?config=domain.tld
you can check this url while your batch file is running, you should see the data add whenever you refresh the page.


A special note: In my case, everything gets logged by IIS, but it may be different for your case. Check the faulty line against mine, if there are differences, you will need to remove the missing tags in the correct LogFormat line.
 
THANK YOU VERY MUCH Spacerino !!

I assure you that I applied your method exactly and that I could recover all the statistics for the whole of my sites.
very sincerely thousand Thank's.
the only question ... I must keep the modification of the LogFormat line ?

Bests regards from jean-claude ( french )
 
You can recover all the statistics if you kept them during that period. Most of my clients prefer to keep 4 or 5 statistics files and everything else except what they had was gone.
 
Same problem here - and I downloaded "fresh" plesk 8.3 from parallels website and upgraded it on 12.04.2008. Since than webstatistics are calculated wrong (both awstats and webalizer).

If support solved this issue on 16.01.2008 how come solution is not included in fresh instalation?????... Not good...

Now I downloaded statistics.exe from sergius post and I will se tommorow if statistics are working again...
 
Where setting awstat update ?

Hello

A newbie question about awstat: where setting on plesk frequency for update stats ?

Tx
 
Back
Top