Article ID: 113842, created on May 10, 2012, last review on Aug 21, 2015

  • Applies to:
  • Plesk 8.x for Windows


Webalizer statistics are missing for a certain period, and running statistics.exe does not help.


The root cause of the issue is unclear, although in some cases, it may occur due to log file corruption.


Make sure that you have already tried to recalculate statistics by running the statistics.exe utility as described in this article:

      1998 [FIX] Web statistics on the server do not get updated

If you are unable to recalculate the statistics with this command and have some time to investigate the problem, feel free to use the available support options in our Support portal (located in the menu on the left). 


If you urgently need to solve the issue, you may use the below workaround.

First, make sure that the log files for the needed period exist in %plesk_vhosts%\domain.tld\statistics\logs\W3SVC12031 (the name of this folder may vary).
Then follow these steps to recalculate the statistics:
1) Create a temporary directory for logs that need to be processed:
mkdir c:\tmplogs

2) Set the environment variable for this directory:
set logsdir=c:\tmplogs

3) Back up previously calculated statistics:
xcopy /ie "C:\Inetpub\vhosts\domain.tld\statistics\webstat" "C:\Inetpub\vhosts\domain.tld\statistics\webstat.back"

4) Copy logs to the newly created directory.
ATTENTION: The log directory may contain very large log files, so copy only logs for the required period of time.
xcopy "%plesk_vhosts%\domain.tld\statistics\logs\W3SVC12031\*log" %logsdir%

5) Delete the webalizer.current file:
del "C:\Inetpub\vhosts\domain.tld\statistics\webstat\webalizer.current

6) Change the directory to %logsdir%:
cd %logsdir%

7) Convert logs from .log format to .ncsa with the convlog utility:
convlog -ie *log

8) Check if logs were converted successfully:
dir /b *ncsa

9) Replace the webalizer.hist file with another one to make Webalizer think that the needed logs have not been processed yet:
rename "C:\Inetpub\vhosts\domain.tld\statistics\webstat\webalizer.hist" webalizer.hist.old
findstr /v /b /c:"4 2012" "C:\Inetpub\vhosts\domain.tld\statistics\webstat\webalizer.hist.old" > "C:\Inetpub\vhosts\domain.tld\statistics\webstat\webalizer.hist"

Pay attention to the "4 2012" part -- this is the month and the year of the period you are getting statistics for. It will not be included in the new file in order to make Webalizer think that the statistics for this period have not been calculated.
10) Start the statistics calculation:
for /f %f in ('dir /b *ncsa') do @"%plesk_dir%\Additional\Webalizer\bin\webalizer" -c "%plesk_dir%\Additional\Webalizer\conf\webalizer.conf" -n "domain.tld" -D "%plesk_dir%\tmp\webalizer.cache" -N 15 -p -F clf -o "C:\Inetpub\vhosts\domain.tld\statistics\webstat" %logsdir%\%f

56797cefb1efc9130f7c48a7d1db0f0c a914db3fdc7a53ddcfd1b2db8f5a1b9c c45acecf540ecd42a4bbfb242ce02b1d 85a92ca67f2200d36506862eaa6ed6b8

Email subscription for changes to this article
Save as PDF